| Modifier and Type | Field and Description |
|---|---|
| private final WebSocketDecoderConfig | |
| protected static final InternalLogger | |
| private String | |
| public static final String | SUB_PROTOCOL_WILDCARD
Use this as wildcard to support all requested sub-protocols |
| private final String[] | |
| private final String | |
| private final WebSocketVersion |
| Access | Constructor and Description |
|---|---|
| protected | WebSocketServerHandshaker(WebSocketVersion
the protocol version version, String URL for web socket communications. e.g "ws://myhost.com/mypath".
Subsequent web socket frames will be sent to this URL. uri, String CSV of supported protocols. Null if sub protocols not supported. subprotocols, int Maximum length of a frame's payload maxFramePayloadLength)Constructor specifying the destination web socket location |
| protected | WebSocketServerHandshaker(WebSocketVersion
the protocol version version, String URL for web socket communications. e.g "ws://myhost.com/mypath".
Subsequent web socket frames will be sent to this URL. uri, String CSV of supported protocols. Null if sub protocols not supported. subprotocols, WebSocketDecoderConfig Frames decoder configuration. decoderConfig)Constructor specifying the destination web socket location |
| Modifier and Type | Method and Description |
|---|---|
| public Future | close(Channel
the channel, CloseWebSocketFrame Channel to use.Closing Frame that was received. frame)Performs the closing handshake. |
| public Future | close(ChannelHandlerContext
the ctx, CloseWebSocketFrame ChannelHandlerContext to use.Closing Frame that was received. frame)Performs the closing handshake. |
| private static Future | |
| public WebSocketDecoderConfig | |
| public Future | Returns: future TheFuture which is notified once the opening handshake completesChannel channel, FullHttpRequest HTTP Request req)Performs the opening handshake. |
| public final Future | Returns: future theFuture which is notified when the opening handshake is doneChannel channel, FullHttpRequest HTTP Request req, HttpHeaders Extra headers to add to the handshake response or responseHeaders)null
if no extra headers should be addedPerforms the opening handshake
Note that the ownership of the |
| public Future | Returns: future TheFuture which is notified once the opening handshake completesChannel channel, HttpRequest HTTP Request req)Performs the opening handshake. |
| public final Future | Returns: future theFuture which is notified when the opening handshake is doneChannel channel, HttpRequest HTTP Request req, final HttpHeaders Extra headers to add to the handshake response or responseHeaders)null
if no extra headers should be addedPerforms the opening handshake
Note that the ownership of the |
| public int | Returns: The maximum length for a frame's payloadGets the maximum length for any frame's payload. |
| protected abstract FullHttpResponse | newHandshakeResponse(BufferAllocator allocator, FullHttpRequest req, HttpHeaders responseHeaders)
Returns a new {@link FullHttpResponse) which will be used for as response to the handshake request. |
| protected abstract WebSocketFrameDecoder | |
| protected abstract WebSocketFrameEncoder | |
| public String | |
| protected String | Returns: First matching supported sub protocol. Null if not found.CSV of protocols to be supported. e.g. "chat, superchat" requestedSubprotocols)Selects the first matching supported sub protocol |
| public Set | |
| public String | |
| public WebSocketVersion |
| decoderConfig | back to summary |
|---|---|
| private final WebSocketDecoderConfig decoderConfig | |
| logger | back to summary |
|---|---|
| protected static final InternalLogger logger | |
| selectedSubprotocol | back to summary |
|---|---|
| private String selectedSubprotocol | |
| SUB_PROTOCOL_WILDCARD | back to summary |
|---|---|
| public static final String SUB_PROTOCOL_WILDCARD Use this as wildcard to support all requested sub-protocols | |
| subprotocols | back to summary |
|---|---|
| private final String[] subprotocols | |
| uri | back to summary |
|---|---|
| private final String uri | |
| version | back to summary |
|---|---|
| private final WebSocketVersion version | |
| WebSocketServerHandshaker | back to summary |
|---|---|
| protected WebSocketServerHandshaker(WebSocketVersion version, String uri, String subprotocols, int maxFramePayloadLength) Constructor specifying the destination web socket location
| |
| WebSocketServerHandshaker | back to summary |
|---|---|
| protected WebSocketServerHandshaker(WebSocketVersion version, String uri, String subprotocols, WebSocketDecoderConfig decoderConfig) Constructor specifying the destination web socket location
| |
| close | back to summary |
|---|---|
| public Future Performs the closing handshake.
When called from within a
| |
| close | back to summary |
|---|---|
| public Future Performs the closing handshake.
| |
| close0 | back to summary |
|---|---|
| private static Future | |
| decoderConfig | back to summary |
|---|---|
| public WebSocketDecoderConfig decoderConfig() Gets this decoder configuration.
| |
| handshake | back to summary |
|---|---|
| public Future Performs the opening handshake. Note that the ownership of the
| |
| handshake | back to summary |
|---|---|
| public final Future Performs the opening handshake
Note that the ownership of the
| |
| handshake | back to summary |
|---|---|
| public Future Performs the opening handshake. Note that the ownership of the
| |
| handshake | back to summary |
|---|---|
| public final Future Performs the opening handshake
Note that the ownership of the
| |
| maxFramePayloadLength | back to summary |
|---|---|
| public int maxFramePayloadLength() Gets the maximum length for any frame's payload.
| |
| newHandshakeResponse | back to summary |
|---|---|
| protected abstract FullHttpResponse newHandshakeResponse(BufferAllocator allocator, FullHttpRequest req, HttpHeaders responseHeaders) Returns a new {@link FullHttpResponse) which will be used for as response to the handshake request. | |
| newWebsocketDecoder | back to summary |
|---|---|
| protected abstract WebSocketFrameDecoder newWebsocketDecoder() Returns the decoder to use after handshake is complete. | |
| newWebSocketEncoder | back to summary |
|---|---|
| protected abstract WebSocketFrameEncoder newWebSocketEncoder() Returns the encoder to use after the handshake is complete. | |
| selectedSubprotocol | back to summary |
|---|---|
| public String selectedSubprotocol() Returns the selected subprotocol. Null if no subprotocol has been selected. This is only available AFTER handshake() has been called. | |
| selectSubprotocol | back to summary |
|---|---|
| protected String selectSubprotocol(String requestedSubprotocols) Selects the first matching supported sub protocol | |
| subprotocols | back to summary |
|---|---|
| public Set Returns the CSV of supported sub protocols | |
| uri | back to summary |
|---|---|
| public String uri() Returns the URL of the web socket | |
| version | back to summary |
|---|---|
| public WebSocketVersion version() Returns the version of the specification being supported | |