diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java index acdacbc6db..1edc552003 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java @@ -54,8 +54,8 @@ public class WebSocketServerProtocolHandler extends ChannelInboundMessageHandler @Override public void afterAdd(ChannelHandlerContext ctx) { // Add the WebSocketHandshakeHandler before this one. - ctx.pipeline().addBefore(ctx.name(), WebSocketServerHandshakeHandler.class.getName(), - new WebSocketServerHandshakeHandler(websocketPath, subprotocols, allowExtensions)); + ctx.pipeline().addBefore(ctx.name(), WebSocketServerProtocolHandshakeHandler.class.getName(), + new WebSocketServerProtocolHandshakeHandler(websocketPath, subprotocols, allowExtensions)); } @Override diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshakeHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java similarity index 92% rename from codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshakeHandler.java rename to codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java index ad14917bb1..d89f2d62fa 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshakeHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java @@ -35,15 +35,15 @@ import io.netty.logging.InternalLoggerFactory; /** * Handles the HTTP handshake (the HTTP Upgrade request) */ -class WebSocketServerHandshakeHandler extends ChannelInboundMessageHandlerAdapter { +public class WebSocketServerProtocolHandshakeHandler extends ChannelInboundMessageHandlerAdapter { private static final InternalLogger logger = - InternalLoggerFactory.getInstance(WebSocketServerHandshakeHandler.class); + InternalLoggerFactory.getInstance(WebSocketServerProtocolHandshakeHandler.class); private final String websocketPath; private final String subprotocols; private final boolean allowExtensions; - public WebSocketServerHandshakeHandler(String websocketPath, String subprotocols, boolean allowExtensions) { + public WebSocketServerProtocolHandshakeHandler(String websocketPath, String subprotocols, boolean allowExtensions) { this.websocketPath = websocketPath; this.subprotocols = subprotocols; this.allowExtensions = allowExtensions; diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java index 16e15a9f34..d75ae96f5e 100644 --- a/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java +++ b/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java @@ -44,7 +44,7 @@ public class WebSocketServerProtocolHandlerTest { @Test public void testHttpUpgradeRequest() throws Exception { EmbeddedMessageChannel ch = createChannel(new MockOutboundHandler()); - ChannelHandlerContext handshakerCtx = ch.pipeline().context(WebSocketServerHandshakeHandler.class); + ChannelHandlerContext handshakerCtx = ch.pipeline().context(WebSocketServerProtocolHandshakeHandler.class); writeUpgradeRequest(ch);