Package org.eclipse.jetty.websocket.api
Interface WebSocketListener
- All Superinterfaces:
WebSocketConnectionListener
- All Known Implementing Classes:
WebSocketAdapter
Basic WebSocket Listener interface for incoming WebSocket message events.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onWebSocketBinary
(byte[] payload, int offset, int len) A WebSocket binary frame has been received.default void
onWebSocketText
(String message) A WebSocket Text frame was received.Methods inherited from interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
onWebSocketClose, onWebSocketConnect, onWebSocketError
-
Method Details
-
onWebSocketBinary
default void onWebSocketBinary(byte[] payload, int offset, int len) A WebSocket binary frame has been received.- Parameters:
payload
- the raw payload array receivedoffset
- the offset in the payload array where the data startslen
- the length of bytes in the payload
-
onWebSocketText
A WebSocket Text frame was received.- Parameters:
message
- the message
-