public class WebSocketServerProtocolHandler extends SimpleChannelUpstreamHandler implements LifeCycleAwareChannelHandler
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 |
---|---|
void |
afterAdd(ChannelHandlerContext ctx) |
void |
afterRemove(ChannelHandlerContext ctx) |
void |
beforeAdd(ChannelHandlerContext ctx) |
void |
beforeRemove(ChannelHandlerContext ctx) |
void |
exceptionCaught(ChannelHandlerContext ctx,
ExceptionEvent e)
Invoked when an exception was raised by an I/O thread or a
ChannelHandler . |
void |
messageReceived(ChannelHandlerContext ctx,
MessageEvent e)
Invoked when a message object (e.g:
ChannelBuffer ) was received
from a remote peer. |
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
public WebSocketServerProtocolHandler(String websocketPath)
public WebSocketServerProtocolHandler(String websocketPath, String subprotocols)
public void afterAdd(ChannelHandlerContext ctx) throws Exception
afterAdd
in interface LifeCycleAwareChannelHandler
Exception
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception
SimpleChannelUpstreamHandler
ChannelBuffer
) was received
from a remote peer.messageReceived
in class SimpleChannelUpstreamHandler
Exception
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception
SimpleChannelUpstreamHandler
ChannelHandler
.exceptionCaught
in class SimpleChannelUpstreamHandler
Exception
public void beforeAdd(ChannelHandlerContext ctx) throws Exception
beforeAdd
in interface LifeCycleAwareChannelHandler
Exception
public void beforeRemove(ChannelHandlerContext ctx) throws Exception
beforeRemove
in interface LifeCycleAwareChannelHandler
Exception
public void afterRemove(ChannelHandlerContext ctx) throws Exception
afterRemove
in interface LifeCycleAwareChannelHandler
Exception
Copyright © 2008-2016 The Netty Project. All Rights Reserved.