XMLWordPrintable

Details

    • Sub-task
    • Resolution: Unresolved
    • Major
    • 3.x Future
    • 2.17.0.Final
    • Java EE

    Description

      It would be good to be able to create a Websocket Client endpoint with the following command :

      websocket-new-client-endpoint --name MyClientEndpoint 
      

      This would generate the following code :

      @ClientEndpoint
      public class MyClientEndpoint {
      }
      

      As a shortcut (see FORGE-2394) we could easily implement basic methods such as :

      websocket-new-client-endpoint --name MyClientEndpoint --methods ON_OPEN ON_CLOSE ON_ERROR ON_MESSAGE
      

      This would generate a client endpoint with the four following methods :

      @ClientEndpoint
      public class MyClientEndpoint {
      
          @OnOpen
          public void onOpen(Session session) {
          }
      
          @OnClose
          public void onClose(CloseReason closeReason) {
          }
      
          @OnMessage
          public void onMessage(String message, Session session) {
          }
          
          @OnError
          public void onError(Throwable t) {
          }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            agoncal Antonio Goncalves (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: