@Test public void testHttpUpgradeRequest() throws Exception { EmbeddedChannel ch = createChannel(new MockOutboundHandler()); ChannelHandlerContext handshakerCtx = ch.pipeline().context(WebSocketServerProtocolHandshakeHandler.class); writeUpgradeRequest(ch); assertEquals(SWITCHING_PROTOCOLS, ReferenceCountUtil.releaseLater(responses.remove()).getStatus()); assertNotNull(WebSocketServerProtocolHandler.getHandshaker(handshakerCtx)); }
static WebSocketServerHandshaker getHandshaker(ChannelHandlerContext ctx) { return ctx.attr(HANDSHAKER_ATTR_KEY).get(); }
WebSocketServerProtocolHandler extends WebSocketProtocolHandler { static WebSocketServerHandshaker getHandshaker(ChannelHandlerContext ctx) { return ctx.attr(HANDSHAKER_ATTR_KEY).get(); } }
WebSocketServerProtocolHandler extends WebSocketProtocolHandler { static WebSocketServerHandshaker getHandshaker(ChannelHandlerContext ctx) { return ctx.attr(HANDSHAKER_ATTR_KEY).get(); } WebSocketServerProtocolHandler(String websocketPath);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols,
            boolean allowExtensions, int maxFrameSize); }
WebSocketServerProtocolHandler extends WebSocketProtocolHandler { static WebSocketServerHandshaker getHandshaker(ChannelHandlerContext ctx) { return ctx.attr(HANDSHAKER_ATTR_KEY).get(); } WebSocketServerProtocolHandler(String websocketPath);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols,
            boolean allowExtensions, int maxFrameSize); @Override void handlerAdded(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause); }
WebSocketServerProtocolHandler extends WebSocketProtocolHandler { static WebSocketServerHandshaker getHandshaker(ChannelHandlerContext ctx) { return ctx.attr(HANDSHAKER_ATTR_KEY).get(); } WebSocketServerProtocolHandler(String websocketPath);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions);  WebSocketServerProtocolHandler(String websocketPath, String subprotocols,
            boolean allowExtensions, int maxFrameSize); @Override void handlerAdded(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause);  }