public class WebSocketServerProtocolHandler extends MessageToMessageDecoder<WebSocketFrame>
ChannelInboundHandler.userEventTriggered(ChannelHandlerContext, Object) and check if the event was instance
of WebSocketServerProtocolHandler.HandshakeComplete, the event will contain extra information about the handshake such as the request and
selected subprotocol.| Modifier and Type | Class and Description |
|---|---|
static class |
WebSocketServerProtocolHandler.HandshakeComplete
The Handshake was completed successfully and the channel was upgraded to websockets.
|
static class |
WebSocketServerProtocolHandler.ServerHandshakeStateEvent
Events that are fired to notify about handshake status
|
ChannelHandler.Sharable| Constructor and Description |
|---|
WebSocketServerProtocolHandler(java.lang.String websocketPath) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
boolean checkStartsWith) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
boolean checkStartsWith,
long handshakeTimeoutMillis) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
long handshakeTimeoutMillis) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean checkStartsWith,
boolean dropPongFrames,
long handshakeTimeoutMillis,
WebSocketDecoderConfig decoderConfig) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith,
boolean dropPongFrames) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith,
boolean dropPongFrames,
long handshakeTimeoutMillis) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith,
long handshakeTimeoutMillis) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
long handshakeTimeoutMillis) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
long handshakeTimeoutMillis) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
long handshakeTimeoutMillis) |
WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
long handshakeTimeoutMillis) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(ChannelHandlerContext ctx,
WebSocketFrame frame,
java.util.List<java.lang.Object> out)
Decode from one message to an other.
|
void |
exceptionCaught(ChannelHandlerContext ctx,
java.lang.Throwable cause)
Calls
ChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline. |
void |
handlerAdded(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerRemovedpublic WebSocketServerProtocolHandler(java.lang.String websocketPath)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
long handshakeTimeoutMillis)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
boolean checkStartsWith)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
boolean checkStartsWith,
long handshakeTimeoutMillis)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
long handshakeTimeoutMillis)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
long handshakeTimeoutMillis)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
long handshakeTimeoutMillis)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
long handshakeTimeoutMillis)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith,
long handshakeTimeoutMillis)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith,
boolean dropPongFrames)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith,
boolean dropPongFrames,
long handshakeTimeoutMillis)
public WebSocketServerProtocolHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean checkStartsWith,
boolean dropPongFrames,
long handshakeTimeoutMillis,
WebSocketDecoderConfig decoderConfig)
public void handlerAdded(ChannelHandlerContext ctx)
ChannelHandlerAdapterhandlerAdded in interface ChannelHandlerhandlerAdded in class ChannelHandlerAdapterprotected void decode(ChannelHandlerContext ctx, WebSocketFrame frame, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageDecoderctx - the ChannelHandlerContext which this MessageToMessageDecoder belongs toframe - the message to decode to an other oneout - the List to which decoded messages should be addedjava.lang.Exception - is thrown if an error occurspublic void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
ChannelInboundHandlerAdapterChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.exceptionCaught in interface ChannelHandlerexceptionCaught in interface ChannelInboundHandlerjava.lang.ExceptionCopyright © 2008–2019 The Netty Project. All rights reserved.