Rename WebSocketServerHandshakeHandler to WebSocketServerProtocolHnadshakeHandler and also make it public. See #587
This commit is contained in:
parent
4353aa6794
commit
6e39192462
@ -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
|
||||
|
@ -35,15 +35,15 @@ import io.netty.logging.InternalLoggerFactory;
|
||||
/**
|
||||
* Handles the HTTP handshake (the HTTP Upgrade request)
|
||||
*/
|
||||
class WebSocketServerHandshakeHandler extends ChannelInboundMessageHandlerAdapter<HttpRequest> {
|
||||
public class WebSocketServerProtocolHandshakeHandler extends ChannelInboundMessageHandlerAdapter<HttpRequest> {
|
||||
|
||||
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;
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user