Class DefaultWebSocket

  • All Implemented Interfaces:
    java.lang.Runnable, WebSocket, org.java_websocket.WebSocket, org.java_websocket.WebSocketListener

    public class DefaultWebSocket
    extends org.java_websocket.client.WebSocketClient
    implements WebSocket
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultWebSocket​(java.net.URI serverURI)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onClose​(int code, java.lang.String reason, boolean remote)  
      void onError​(java.lang.Exception e)  
      void onMessage​(java.lang.String message)  
      void onMessage​(java.nio.ByteBuffer message)  
      void onOpen​(org.java_websocket.handshake.ServerHandshake handshakedata)  
      static void setTimeout​(java.lang.Runnable runnable, int delay)  
      void subscribe​(WebSocketListener listener)  
      • Methods inherited from class org.java_websocket.client.WebSocketClient

        close, close, close, closeBlocking, closeConnection, connect, connectBlocking, connectBlocking, getAttachment, getConnection, getDraft, getLocalSocketAddress, getLocalSocketAddress, getReadyState, getRemoteSocketAddress, getRemoteSocketAddress, getResourceDescriptor, getSocket, getURI, hasBufferedData, isClosed, isClosing, isFlushAndClose, isOpen, onCloseInitiated, onClosing, onWebsocketClose, onWebsocketCloseInitiated, onWebsocketClosing, onWebsocketError, onWebsocketMessage, onWebsocketMessage, onWebsocketOpen, onWriteDemand, reconnect, reconnectBlocking, run, send, send, send, sendFragmentedFrame, sendFrame, sendFrame, sendPing, setAttachment, setProxy, setSocket, setSocketFactory
      • Methods inherited from class org.java_websocket.AbstractWebSocket

        getConnectionLostTimeout, isReuseAddr, isTcpNoDelay, setConnectionLostTimeout, setReuseAddr, setTcpNoDelay
      • Methods inherited from class org.java_websocket.WebSocketAdapter

        onWebsocketHandshakeReceivedAsClient, onWebsocketHandshakeReceivedAsServer, onWebsocketHandshakeSentAsClient, onWebsocketPing, onWebsocketPong
      • Methods inherited from class java.lang.Object

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

      • DefaultWebSocket

        public DefaultWebSocket​(java.net.URI serverURI)
    • Method Detail

      • onOpen

        public void onOpen​(org.java_websocket.handshake.ServerHandshake handshakedata)
        Specified by:
        onOpen in class org.java_websocket.client.WebSocketClient
      • onClose

        public void onClose​(int code,
                            java.lang.String reason,
                            boolean remote)
        Specified by:
        onClose in class org.java_websocket.client.WebSocketClient
      • onMessage

        public void onMessage​(java.lang.String message)
        Specified by:
        onMessage in class org.java_websocket.client.WebSocketClient
      • onMessage

        public void onMessage​(java.nio.ByteBuffer message)
        Overrides:
        onMessage in class org.java_websocket.client.WebSocketClient
      • onError

        public void onError​(java.lang.Exception e)
        Specified by:
        onError in class org.java_websocket.client.WebSocketClient
      • setTimeout

        public static void setTimeout​(java.lang.Runnable runnable,
                                      int delay)