-
- All Implemented Interfaces:
@WebSocket() public final class WsConnection
Is instantiated for every WebSocket connection. It keeps the session and sessionId and handles incoming events by delegating to the registered before, endpoint, after and logger handlers.
-
-
Field Summary
Fields Modifier and Type Field Description private final WsPathMatcher
matcher
private final WsExceptionMapper
exceptionMapper
private final WsConfig
wsLogger
-
Constructor Summary
Constructors Constructor Description WsConnection(WsPathMatcher matcher, WsExceptionMapper exceptionMapper, WsConfig wsLogger)
-
Method Summary
Modifier and Type Method Description final WsPathMatcher
getMatcher()
final WsExceptionMapper
getExceptionMapper()
final WsConfig
getWsLogger()
final Unit
onConnect(Session session)
final Unit
onMessage(Session session, String message)
final Unit
onMessage(Session session, ByteArray buffer, Integer offset, Integer length)
final Unit
onClose(Session session, Integer statusCode, String reason)
final Unit
onError(Session session, Throwable throwable)
-
-
Constructor Detail
-
WsConnection
WsConnection(WsPathMatcher matcher, WsExceptionMapper exceptionMapper, WsConfig wsLogger)
-
-
Method Detail
-
getMatcher
final WsPathMatcher getMatcher()
-
getExceptionMapper
final WsExceptionMapper getExceptionMapper()
-
getWsLogger
final WsConfig getWsLogger()
-
onMessage
@OnWebSocketMessage() final Unit onMessage(Session session, ByteArray buffer, Integer offset, Integer length)
-
-
-
-