class WebSocketServerProtocolHandshakeHandler extends ChannelInboundHandlerAdapter
WebSocketServerProtocolHandler.ChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowExtensions |
private boolean |
allowMaskMismatch |
private boolean |
checkStartsWith |
private int |
maxFramePayloadSize |
private java.lang.String |
subprotocols |
private java.lang.String |
websocketPath |
| Constructor and Description |
|---|
WebSocketServerProtocolHandshakeHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch) |
WebSocketServerProtocolHandshakeHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead(ChannelHandlerContext ctx,
java.lang.Object msg)
Calls
ChannelHandlerContext.fireChannelRead(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline. |
private static java.lang.String |
getWebSocketLocation(ChannelPipeline cp,
HttpRequest req,
java.lang.String path) |
private boolean |
isNotWebSocketPath(FullHttpRequest req) |
private static void |
sendHttpResponse(ChannelHandlerContext ctx,
HttpRequest req,
HttpResponse res) |
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAdded, handlerRemovedprivate final java.lang.String websocketPath
private final java.lang.String subprotocols
private final boolean allowExtensions
private final int maxFramePayloadSize
private final boolean allowMaskMismatch
private final boolean checkStartsWith
WebSocketServerProtocolHandshakeHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch)
WebSocketServerProtocolHandshakeHandler(java.lang.String websocketPath,
java.lang.String subprotocols,
boolean allowExtensions,
int maxFrameSize,
boolean allowMaskMismatch,
boolean checkStartsWith)
public void channelRead(ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
ChannelInboundHandlerAdapterChannelHandlerContext.fireChannelRead(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelRead in interface ChannelInboundHandlerchannelRead in class ChannelInboundHandlerAdapterjava.lang.Exceptionprivate boolean isNotWebSocketPath(FullHttpRequest req)
private static void sendHttpResponse(ChannelHandlerContext ctx, HttpRequest req, HttpResponse res)
private static java.lang.String getWebSocketLocation(ChannelPipeline cp, HttpRequest req, java.lang.String path)