public class WebSocketServerProtocolHandler extends MessageToMessageDecoder<WebSocketFrame>
ChannelInboundHandler.userEventTriggered(ChannelHandlerContext, Object) and check if the event was of type
WebSocketServerProtocolHandler.ServerHandshakeStateEvent.HANDSHAKE_COMPLETE.| Modifier and Type | Class and Description |
|---|---|
static class |
WebSocketServerProtocolHandler.ServerHandshakeStateEvent
Events that are fired to notify about handshake status
|
ChannelHandler.Sharable| Constructor and Description |
|---|
WebSocketServerProtocolHandler(String websocketPath) |
WebSocketServerProtocolHandler(String websocketPath,
String subprotocols) |
WebSocketServerProtocolHandler(String websocketPath,
String subprotocols,
boolean allowExtensions) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(ChannelHandlerContext ctx,
WebSocketFrame frame,
List<Object> out)
Decode from one message to an other.
|
void |
exceptionCaught(ChannelHandlerContext ctx,
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, userEventTriggeredhandlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerRemovedpublic WebSocketServerProtocolHandler(String websocketPath)
public WebSocketServerProtocolHandler(String websocketPath, String subprotocols)
public void handlerAdded(ChannelHandlerContext ctx)
ChannelHandlerAdapterhandlerAdded in interface ChannelHandlerhandlerAdded in class ChannelHandlerAdapterprotected void decode(ChannelHandlerContext ctx, WebSocketFrame frame, List<Object> out) throws 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 addedException - is thrown if an error accourpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws 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 ChannelInboundHandlerExceptionCopyright © 2008–2014 The Netty Project. All rights reserved.