Class WebSocketAdapter
- All Implemented Interfaces:
WebSocketListener
- Direct Known Subclasses:
WebSocketApplication
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked whenWebSocket.onClose(DataFrame)has been called on a particularWebSocketinstance.voidInvoked when the opening handshake has been completed for a specificWebSocketinstance.voidonFragment(WebSocket socket, byte[] fragment, boolean last) Invoked whenWebSocket.onFragment(boolean, byte[])has been called on a particularWebSocketinstance.voidonFragment(WebSocket socket, String fragment, boolean last) Invoked whenWebSocket.onFragment(boolean, String)has been called on a particularWebSocketinstance.voidInvoked whenWebSocket.onMessage(String)has been called on a particularWebSocketinstance.voidInvoked whenWebSocket.onMessage(String)has been called on a particularWebSocketinstance.voidInvoked whenWebSocket.onPing(DataFrame)has been called on a particularWebSocketinstance.voidInvoked whenWebSocket.onPong(DataFrame)has been called on a particularWebSocketinstance.
-
Constructor Details
-
WebSocketAdapter
public WebSocketAdapter()
-
-
Method Details
-
onClose
Description copied from interface:WebSocketListenerInvoked when
WebSocket.onClose(DataFrame)has been called on a particularWebSocketinstance.- Specified by:
onClosein interfaceWebSocketListener- Parameters:
socket- theWebSocketbeing closed.frame- the closingDataFramesent by the remote end-point.
-
onConnect
Description copied from interface:WebSocketListenerInvoked when the opening handshake has been completed for a specific
WebSocketinstance.- Specified by:
onConnectin interfaceWebSocketListener- Parameters:
socket- the newly connectedWebSocket
-
onMessage
Description copied from interface:WebSocketListenerInvoked when
WebSocket.onMessage(String)has been called on a particularWebSocketinstance.- Specified by:
onMessagein interfaceWebSocketListener- Parameters:
socket- theWebSocketthat received a message.text- the message received.
-
onMessage
Description copied from interface:WebSocketListenerInvoked when
WebSocket.onMessage(String)has been called on a particularWebSocketinstance.- Specified by:
onMessagein interfaceWebSocketListener- Parameters:
socket- theWebSocketthat received a message.bytes- the message received.
-
onPing
Description copied from interface:WebSocketListenerInvoked when
WebSocket.onPing(DataFrame)has been called on a particularWebSocketinstance.- Specified by:
onPingin interfaceWebSocketListener- Parameters:
socket- theWebSocketthat received the ping.bytes- the payload of the ping frame, if any.
-
onPong
Description copied from interface:WebSocketListenerInvoked when
WebSocket.onPong(DataFrame)has been called on a particularWebSocketinstance.- Specified by:
onPongin interfaceWebSocketListener- Parameters:
socket- theWebSocketthat received the pong.bytes- the payload of the pong frame, if any.
-
onFragment
Description copied from interface:WebSocketListenerInvoked when
WebSocket.onFragment(boolean, String)has been called on a particularWebSocketinstance.- Specified by:
onFragmentin interfaceWebSocketListener- Parameters:
socket- theWebSocketreceived the message fragment.fragment- the message fragment.last- flag indicating if this was the last fragment.
-
onFragment
Description copied from interface:WebSocketListenerInvoked when
WebSocket.onFragment(boolean, byte[])has been called on a particularWebSocketinstance.- Specified by:
onFragmentin interfaceWebSocketListener- Parameters:
socket- theWebSocketreceived the message fragment.fragment- the message fragment.last- flag indicating if this was the last fragment.
-