Class ChatAppEndpoint

  • All Implemented Interfaces:
    org.wso2.msf4j.websocket.WebSocketEndpoint

    public class ChatAppEndpoint
    extends java.lang.Object
    implements org.wso2.msf4j.websocket.WebSocketEndpoint
    This is a Sample class for WebSocket. This provides a chat with multiple users.
    • Constructor Summary

      Constructors 
      Constructor Description
      ChatAppEndpoint()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onClose​(java.lang.String name, javax.websocket.CloseReason closeReason, org.wso2.transport.http.netty.contract.websocket.WebSocketConnection webSocketConnection)  
      void onError​(java.lang.Throwable throwable)  
      void onOpen​(java.lang.String name, org.wso2.transport.http.netty.contract.websocket.WebSocketConnection webSocketConnection)  
      void onTextMessage​(java.lang.String name, java.lang.String text, org.wso2.transport.http.netty.contract.websocket.WebSocketConnection webSocketConnection)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChatAppEndpoint

        public ChatAppEndpoint()
    • Method Detail

      • onOpen

        public void onOpen​(java.lang.String name,
                           org.wso2.transport.http.netty.contract.websocket.WebSocketConnection webSocketConnection)
      • onTextMessage

        public void onTextMessage​(java.lang.String name,
                                  java.lang.String text,
                                  org.wso2.transport.http.netty.contract.websocket.WebSocketConnection webSocketConnection)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • onClose

        public void onClose​(java.lang.String name,
                            javax.websocket.CloseReason closeReason,
                            org.wso2.transport.http.netty.contract.websocket.WebSocketConnection webSocketConnection)
      • onError

        public void onError​(java.lang.Throwable throwable)