ChannelInboundHandler#userEventTriggered(ChannelHandlerContext, Object) and check if the event was instance
of HandshakeComplete, the event will contain extra information about the handshake such as the request and
selected subprotocol.
| Modifier and Type | Class and Description |
|---|---|
| public static class | WebSocketServerProtocolHandler.HandshakeComplete
The Handshake was completed successfully and the channel was upgraded to websockets. |
| public static enum | WebSocketServerProtocolHandler.ServerHandshakeStateEvent
Events that are fired to notify about handshake status |
| Modifier and Type | Field and Description |
|---|---|
| private static final AttributeKey | |
| private final WebSocketServerProtocolConfig |
| Access | Constructor and Description |
|---|---|
| public | WebSocketServerProtocolHandler(WebSocketServerProtocolConfig
Server protocol configuration. serverConfig)Base constructor |
| public | |
| public | |
| public | |
| public | WebSocketServerProtocolHandler(String websocketPath, boolean checkStartsWith, long handshakeTimeoutMillis)
|
| public | |
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, long handshakeTimeoutMillis)
|
| public | |
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, long handshakeTimeoutMillis)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, long handshakeTimeoutMillis)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, long handshakeTimeoutMillis)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, boolean checkStartsWith)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, boolean checkStartsWith, long handshakeTimeoutMillis)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, boolean checkStartsWith, boolean dropPongFrames)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, boolean checkStartsWith, boolean dropPongFrames, long handshakeTimeoutMillis)
|
| public | WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean checkStartsWith, boolean dropPongFrames, long handshakeTimeoutMillis, WebSocketDecoderConfig decoderConfig)
|
| HANDSHAKER_ATTR_KEY | back to summary |
|---|---|
| private static final AttributeKey<WebSocketServerHandshaker> HANDSHAKER_ATTR_KEY | |
| serverConfig | back to summary |
|---|---|
| private final WebSocketServerProtocolConfig serverConfig | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(WebSocketServerProtocolConfig serverConfig) Base constructor
| |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, long handshakeTimeoutMillis) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, boolean checkStartsWith) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, boolean checkStartsWith, long handshakeTimeoutMillis) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, long handshakeTimeoutMillis) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, long handshakeTimeoutMillis) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, long handshakeTimeoutMillis) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, long handshakeTimeoutMillis) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, boolean checkStartsWith) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, boolean checkStartsWith, long handshakeTimeoutMillis) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, boolean checkStartsWith, boolean dropPongFrames) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions, int maxFrameSize, boolean allowMaskMismatch, boolean checkStartsWith, boolean dropPongFrames, long handshakeTimeoutMillis) | |
| WebSocketServerProtocolHandler | back to summary |
|---|---|
| public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean checkStartsWith, boolean dropPongFrames, long handshakeTimeoutMillis, WebSocketDecoderConfig decoderConfig) | |
| buildHandshakeException | back to summary |
|---|---|
| protected WebSocketServerHandshakeException buildHandshakeException(String message) Overrides io. Doc from io. Returns a
| |
| decode | back to summary |
|---|---|
| protected void decode(ChannelHandlerContext ctx, WebSocketFrame frame, List<Object> out) throws Exception Overrides io. Doc from io. Decode from one message to an other. This method will be called for each written message that can be handled by this decoder.
| |
| exceptionCaught | back to summary |
|---|---|
| public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception Overrides io. Implements io. Doc from io. Gets called if a
| |
| getHandshaker | back to summary |
|---|---|
| pack-priv static WebSocketServerHandshaker getHandshaker(Channel channel) | |
| handlerAdded | back to summary |
|---|---|
| public void handlerAdded(ChannelHandlerContext ctx) Overrides io. Implements io. Doc from io. Gets called after the
| |
| setHandshaker | back to summary |
|---|---|
| pack-priv static void setHandshaker(Channel channel, WebSocketServerHandshaker handshaker) | |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpHeaders | |
| private final String | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public HttpHeaders | |
| public String | |
| public String |
| requestHeaders | back to summary |
|---|---|
| private final HttpHeaders requestHeaders | |
| requestUri | back to summary |
|---|---|
| private final String requestUri | |
| selectedSubprotocol | back to summary |
|---|---|
| private final String selectedSubprotocol | |
| HandshakeComplete | back to summary |
|---|---|
| public HandshakeComplete(String requestUri, HttpHeaders requestHeaders, String selectedSubprotocol) | |
| requestHeaders | back to summary |
|---|---|
| public HttpHeaders requestHeaders() | |
| requestUri | back to summary |
|---|---|
| public String requestUri() | |
| selectedSubprotocol | back to summary |
|---|---|
| public String selectedSubprotocol() | |
| Modifier and Type | Field and Description |
|---|---|
| public static final WebSocketServerProtocolHandler. | HANDSHAKE_COMPLETE
The Handshake was completed successfully and the channel was upgraded to websockets. |
| public static final WebSocketServerProtocolHandler. | HANDSHAKE_TIMEOUT
The Handshake was timed out |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static WebSocketServerProtocolHandler. | |
| public static WebSocketServerProtocolHandler. |
| HANDSHAKE_COMPLETE | back to summary |
|---|---|
| public static final WebSocketServerProtocolHandler. Deprecated in favor of The Handshake was completed successfully and the channel was upgraded to websockets. | |
| HANDSHAKE_TIMEOUT | back to summary |
|---|---|
| public static final WebSocketServerProtocolHandler. The Handshake was timed out | |
| ServerHandshakeStateEvent | back to summary |
|---|---|
| private ServerHandshakeStateEvent() | |
| valueOf | back to summary |
|---|---|
| public static WebSocketServerProtocolHandler. | |
| values | back to summary |
|---|---|
| public static WebSocketServerProtocolHandler. | |