public class WebSocketServerProtocolHandshakeHandler extends SimpleChannelUpstreamHandler
ChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowExtensions |
private static InternalLogger |
logger |
private java.lang.String |
subprotocols |
private java.lang.String |
websocketPath |
| Constructor and Description |
|---|
WebSocketServerProtocolHandshakeHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions) |
| Modifier and Type | Method and Description |
|---|---|
void |
exceptionCaught(ChannelHandlerContext ctx,
java.lang.Throwable cause) |
private static java.lang.String |
getWebSocketLocation(ChannelPipeline cp,
HttpRequest req,
java.lang.String path) |
void |
messageReceived(ChannelHandlerContext ctx,
MessageEvent e)
Invoked when a message object (e.g:
ChannelBuffer) was received
from a remote peer. |
private static void |
sendHttpResponse(ChannelHandlerContext ctx,
HttpRequest req,
HttpResponse res) |
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, exceptionCaught, handleUpstream, writeCompleteprivate static final InternalLogger logger
private final java.lang.String websocketPath
private final java.lang.String subprotocols
private final boolean allowExtensions
public WebSocketServerProtocolHandshakeHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions)
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws java.lang.Exception
SimpleChannelUpstreamHandlerChannelBuffer) was received
from a remote peer.messageReceived in class SimpleChannelUpstreamHandlerjava.lang.Exceptionpublic void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
java.lang.Exceptionprivate static void sendHttpResponse(ChannelHandlerContext ctx, HttpRequest req, HttpResponse res)
private static java.lang.String getWebSocketLocation(ChannelPipeline cp, HttpRequest req, java.lang.String path)