Interface IWebSocketProcessor
- All Known Implementing Classes:
AbstractWebSocketProcessor
,JavaxWebSocketProcessor
public interface IWebSocketProcessor
Processes web socket messages.
- Since:
- 6.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
A notification after the close of the web socket connection.void
A notification after a communication error.void
onMessage
(byte[] data, int offset, int length) Called when a binary message arrives from the clientvoid
Called when a text message arrives from the clientvoid
A client successfully has made a web socket connection.default void
onOpen
(IWebSocketSession webSocketSession, WebApplication application) Called when thenIWebSocketSession
is being opened: to allow to configure the underlying web socket session.
-
Method Details
-
onOpen
Called when thenIWebSocketSession
is being opened: to allow to configure the underlying web socket session.- Parameters:
webSocketSession
- theIWebSocketSession
application
- theWebApplication
-
onMessage
Called when a text message arrives from the client- Parameters:
message
- the text message from the client
-
onMessage
Called when a binary message arrives from the client- Parameters:
data
- the binary message from the clientoffset
- the offset to read fromlength
- how much data to read
-
onOpen
A client successfully has made a web socket connection.- Parameters:
containerConnection
- the web socket connection to use to communicate with the client
-
onClose
A notification after the close of the web socket connection. The connection could be closed by either the client or the server- Parameters:
closeCode
- The close codemessage
- the message
-
onError
A notification after a communication error.- Parameters:
t
- The throwable for the communication problem
-