| 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 ChannelFuture | close(Channel
the channel, CloseWebSocketFrame Channel to use.Closing Frame that was received. frame)Performs the closing handshake. |
| public ChannelFuture | close(Channel
the channel, CloseWebSocketFrame Channel to use.Closing Frame that was received. frame, ChannelPromise the promise)ChannelPromise to be notified when the closing handshake is donePerforms the closing handshake. |
| public ChannelFuture | close(ChannelHandlerContext
the ctx, CloseWebSocketFrame ChannelHandlerContext to use.Closing Frame that was received. frame)Performs the closing handshake. |
| public ChannelFuture | close(ChannelHandlerContext
the ctx, CloseWebSocketFrame ChannelHandlerContext to use.Closing Frame that was received. frame, ChannelPromise the promise)ChannelPromise to be notified when the closing handshake is done.Performs the closing handshake. |
| private ChannelFuture | |
| public WebSocketDecoderConfig | |
| public ChannelFuture | Returns: future TheChannelFuture which is notified once the opening handshake completesChannel channel, FullHttpRequest HTTP Request req)Performs the opening handshake. |
| public final ChannelFuture | Returns: future theChannelFuture 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, final ChannelPromise null if no extra headers should be addedthe promise)ChannelPromise to be notified when the opening handshake is donePerforms the opening handshake
When call this method you MUST NOT retain the |
| public ChannelFuture | Returns: future TheChannelFuture which is notified once the opening handshake completesChannel channel, HttpRequest HTTP Request req)Performs the opening handshake. |
| public final ChannelFuture | Returns: future theChannelFuture 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, final ChannelPromise null if no extra headers should be addedthe promise)ChannelPromise to be notified when the opening handshake is donePerforms the opening handshake
When call this method you MUST NOT retain the |
| public int | Returns: The maximum length for a frame's payloadGets the maximum length for any frame's payload. |
| protected abstract FullHttpResponse | newHandshakeResponse(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 ChannelFuture close(Channel channel, CloseWebSocketFrame frame) Performs the closing handshake.
When called from within a
| |
| close | back to summary |
|---|---|
| public ChannelFuture close(Channel channel, CloseWebSocketFrame frame, ChannelPromise promise) Performs the closing handshake.
When called from within a
| |
| close | back to summary |
|---|---|
| public ChannelFuture close(ChannelHandlerContext ctx, CloseWebSocketFrame frame) Performs the closing handshake.
| |
| close | back to summary |
|---|---|
| public ChannelFuture close(ChannelHandlerContext ctx, CloseWebSocketFrame frame, ChannelPromise promise) Performs the closing handshake.
| |
| close0 | back to summary |
|---|---|
| private ChannelFuture close0(ChannelOutboundInvoker invoker, CloseWebSocketFrame frame, ChannelPromise promise) | |
| decoderConfig | back to summary |
|---|---|
| public WebSocketDecoderConfig decoderConfig() Gets this decoder configuration.
| |
| handshake | back to summary |
|---|---|
| public ChannelFuture handshake(Channel channel, FullHttpRequest req) Performs the opening handshake. When call this method you MUST NOT retain the
| |
| handshake | back to summary |
|---|---|
| public final ChannelFuture handshake(Channel channel, FullHttpRequest req, HttpHeaders responseHeaders, final ChannelPromise promise) Performs the opening handshake
When call this method you MUST NOT retain the
| |
| handshake | back to summary |
|---|---|
| public ChannelFuture handshake(Channel channel, HttpRequest req) Performs the opening handshake. When call this method you MUST NOT retain the
| |
| handshake | back to summary |
|---|---|
| public final ChannelFuture handshake(final Channel channel, HttpRequest req, final HttpHeaders responseHeaders, final ChannelPromise promise) Performs the opening handshake
When call this method you MUST NOT retain 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(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 | |