class io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler extends io.netty.channel.ChannelInboundHandlerAdapter
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler
super_class: io.netty.channel.ChannelInboundHandlerAdapter
{
private final java.lang.String websocketPath;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String subprotocols;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean allowExtensions;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int maxFramePayloadSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean allowMaskMismatch;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean checkStartsWith;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void <init>(java.lang.String, java.lang.String, boolean, int, boolean);
descriptor: (Ljava/lang/String;Ljava/lang/String;ZIZ)V
flags: (0x0000)
Code:
stack=7, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
aload 1
aload 2
iload 3
iload 4
iload 5
iconst_0
invokespecial io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.<init>:(Ljava/lang/String;Ljava/lang/String;ZIZZ)V
1: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler;
0 2 1 websocketPath Ljava/lang/String;
0 2 2 subprotocols Ljava/lang/String;
0 2 3 allowExtensions Z
0 2 4 maxFrameSize I
0 2 5 allowMaskMismatch Z
MethodParameters:
Name Flags
websocketPath
subprotocols
allowExtensions
maxFrameSize
allowMaskMismatch
void <init>(java.lang.String, java.lang.String, boolean, int, boolean, boolean);
descriptor: (Ljava/lang/String;Ljava/lang/String;ZIZZ)V
flags: (0x0000)
Code:
stack=2, locals=7, args_size=7
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 0: aload 0
invokespecial io.netty.channel.ChannelInboundHandlerAdapter.<init>:()V
1: aload 0
aload 1
putfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.websocketPath:Ljava/lang/String;
2: aload 0
aload 2
putfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.subprotocols:Ljava/lang/String;
3: aload 0
iload 3
putfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.allowExtensions:Z
4: aload 0
iload 4
putfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.maxFramePayloadSize:I
5: aload 0
iload 5
putfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.allowMaskMismatch:Z
6: aload 0
iload 6
putfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.checkStartsWith:Z
7: return
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lio/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler;
0 8 1 websocketPath Ljava/lang/String;
0 8 2 subprotocols Ljava/lang/String;
0 8 3 allowExtensions Z
0 8 4 maxFrameSize I
0 8 5 allowMaskMismatch Z
0 8 6 checkStartsWith Z
MethodParameters:
Name Flags
websocketPath
subprotocols
allowExtensions
maxFrameSize
allowMaskMismatch
checkStartsWith
public void channelRead(io.netty.channel.ChannelHandlerContext, java.lang.Object);
descriptor: (Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 2
checkcast io.netty.handler.codec.http.FullHttpRequest
astore 3
start local 3 1: aload 0
aload 3
invokevirtual io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.isNotWebSocketPath:(Lio/netty/handler/codec/http/FullHttpRequest;)Z
ifeq 4
2: aload 1
aload 2
invokeinterface io.netty.channel.ChannelHandlerContext.fireChannelRead:(Ljava/lang/Object;)Lio/netty/channel/ChannelHandlerContext;
pop
3: return
4: StackMap locals: io.netty.handler.codec.http.FullHttpRequest
StackMap stack:
aload 3
invokeinterface io.netty.handler.codec.http.FullHttpRequest.method:()Lio/netty/handler/codec/http/HttpMethod;
getstatic io.netty.handler.codec.http.HttpMethod.GET:Lio/netty/handler/codec/http/HttpMethod;
if_acmpeq 8
5: aload 1
aload 3
new io.netty.handler.codec.http.DefaultFullHttpResponse
dup
getstatic io.netty.handler.codec.http.HttpVersion.HTTP_1_1:Lio/netty/handler/codec/http/HttpVersion;
getstatic io.netty.handler.codec.http.HttpResponseStatus.FORBIDDEN:Lio/netty/handler/codec/http/HttpResponseStatus;
invokespecial io.netty.handler.codec.http.DefaultFullHttpResponse.<init>:(Lio/netty/handler/codec/http/HttpVersion;Lio/netty/handler/codec/http/HttpResponseStatus;)V
invokestatic io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.sendHttpResponse:(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/HttpRequest;Lio/netty/handler/codec/http/HttpResponse;)V
6: aload 3
invokeinterface io.netty.handler.codec.http.FullHttpRequest.release:()Z
pop
7: return
8: StackMap locals:
StackMap stack:
new io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory
dup
9: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.pipeline:()Lio/netty/channel/ChannelPipeline;
aload 3
aload 0
getfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.websocketPath:Ljava/lang/String;
invokestatic io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.getWebSocketLocation:(Lio/netty/channel/ChannelPipeline;Lio/netty/handler/codec/http/HttpRequest;Ljava/lang/String;)Ljava/lang/String;
aload 0
getfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.subprotocols:Ljava/lang/String;
10: aload 0
getfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.allowExtensions:Z
aload 0
getfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.maxFramePayloadSize:I
aload 0
getfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.allowMaskMismatch:Z
11: invokespecial io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory.<init>:(Ljava/lang/String;Ljava/lang/String;ZIZ)V
astore 4
start local 4 12: aload 4
aload 3
invokevirtual io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory.newHandshaker:(Lio/netty/handler/codec/http/HttpRequest;)Lio/netty/handler/codec/http/websocketx/WebSocketServerHandshaker;
astore 5
start local 5 13: aload 5
ifnonnull 16
14: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.channel:()Lio/netty/channel/Channel;
invokestatic io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory.sendUnsupportedVersionResponse:(Lio/netty/channel/Channel;)Lio/netty/channel/ChannelFuture;
pop
15: goto 26
16: StackMap locals: io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker
StackMap stack:
aload 5
aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.channel:()Lio/netty/channel/Channel;
aload 3
invokevirtual io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker.handshake:(Lio/netty/channel/Channel;Lio/netty/handler/codec/http/FullHttpRequest;)Lio/netty/channel/ChannelFuture;
astore 6
start local 6 17: aload 6
new io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$1
dup
aload 0
aload 1
aload 3
aload 5
invokespecial io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$1.<init>:(Lio/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler;Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;Lio/netty/handler/codec/http/websocketx/WebSocketServerHandshaker;)V
invokeinterface io.netty.channel.ChannelFuture.addListener:(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;
pop
18: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.channel:()Lio/netty/channel/Channel;
aload 5
invokestatic io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler.setHandshaker:(Lio/netty/channel/Channel;Lio/netty/handler/codec/http/websocketx/WebSocketServerHandshaker;)V
19: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.pipeline:()Lio/netty/channel/ChannelPipeline;
aload 0
ldc "WS403Responder"
20: invokestatic io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler.forbiddenHttpRequestResponder:()Lio/netty/channel/ChannelHandler;
21: invokeinterface io.netty.channel.ChannelPipeline.replace:(Lio/netty/channel/ChannelHandler;Ljava/lang/String;Lio/netty/channel/ChannelHandler;)Lio/netty/channel/ChannelPipeline;
pop
end local 6 end local 5 end local 4 22: goto 26
StackMap locals: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler io.netty.channel.ChannelHandlerContext java.lang.Object io.netty.handler.codec.http.FullHttpRequest
StackMap stack: java.lang.Throwable
23: astore 7
24: aload 3
invokeinterface io.netty.handler.codec.http.FullHttpRequest.release:()Z
pop
25: aload 7
athrow
26: StackMap locals:
StackMap stack:
aload 3
invokeinterface io.netty.handler.codec.http.FullHttpRequest.release:()Z
pop
27: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Lio/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler;
0 28 1 ctx Lio/netty/channel/ChannelHandlerContext;
0 28 2 msg Ljava/lang/Object;
1 28 3 req Lio/netty/handler/codec/http/FullHttpRequest;
12 22 4 wsFactory Lio/netty/handler/codec/http/websocketx/WebSocketServerHandshakerFactory;
13 22 5 handshaker Lio/netty/handler/codec/http/websocketx/WebSocketServerHandshaker;
17 22 6 handshakeFuture Lio/netty/channel/ChannelFuture;
Exception table:
from to target type
4 6 23 any
8 23 23 any
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
ctx final
msg
private boolean isNotWebSocketPath(io.netty.handler.codec.http.FullHttpRequest);
descriptor: (Lio/netty/handler/codec/http/FullHttpRequest;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.checkStartsWith:Z
ifeq 2
aload 1
invokeinterface io.netty.handler.codec.http.FullHttpRequest.uri:()Ljava/lang/String;
aload 0
getfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.websocketPath:Ljava/lang/String;
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 1
iconst_0
goto 4
StackMap locals:
StackMap stack:
1: iconst_1
goto 4
StackMap locals:
StackMap stack:
2: aload 1
invokeinterface io.netty.handler.codec.http.FullHttpRequest.uri:()Ljava/lang/String;
aload 0
getfield io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler.websocketPath:Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 3
iconst_0
goto 4
StackMap locals:
StackMap stack:
3: iconst_1
StackMap locals:
StackMap stack: int
4: ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler;
0 5 1 req Lio/netty/handler/codec/http/FullHttpRequest;
MethodParameters:
Name Flags
req
private static void sendHttpResponse(io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.http.HttpRequest, io.netty.handler.codec.http.HttpResponse);
descriptor: (Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/HttpRequest;Lio/netty/handler/codec/http/HttpResponse;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokeinterface io.netty.channel.ChannelHandlerContext.channel:()Lio/netty/channel/Channel;
aload 2
invokeinterface io.netty.channel.Channel.writeAndFlush:(Ljava/lang/Object;)Lio/netty/channel/ChannelFuture;
astore 3
start local 3 1: aload 1
invokestatic io.netty.handler.codec.http.HttpUtil.isKeepAlive:(Lio/netty/handler/codec/http/HttpMessage;)Z
ifeq 2
aload 2
invokeinterface io.netty.handler.codec.http.HttpResponse.status:()Lio/netty/handler/codec/http/HttpResponseStatus;
invokevirtual io.netty.handler.codec.http.HttpResponseStatus.code:()I
sipush 200
if_icmpeq 3
2: StackMap locals: io.netty.channel.ChannelFuture
StackMap stack:
aload 3
getstatic io.netty.channel.ChannelFutureListener.CLOSE:Lio/netty/channel/ChannelFutureListener;
invokeinterface io.netty.channel.ChannelFuture.addListener:(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;
pop
3: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 ctx Lio/netty/channel/ChannelHandlerContext;
0 4 1 req Lio/netty/handler/codec/http/HttpRequest;
0 4 2 res Lio/netty/handler/codec/http/HttpResponse;
1 4 3 f Lio/netty/channel/ChannelFuture;
MethodParameters:
Name Flags
ctx
req
res
private static java.lang.String getWebSocketLocation(io.netty.channel.ChannelPipeline, io.netty.handler.codec.http.HttpRequest, java.lang.String);
descriptor: (Lio/netty/channel/ChannelPipeline;Lio/netty/handler/codec/http/HttpRequest;Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: ldc "ws"
astore 3
start local 3 1: aload 0
ldc Lio/netty/handler/ssl/SslHandler;
invokeinterface io.netty.channel.ChannelPipeline.get:(Ljava/lang/Class;)Lio/netty/channel/ChannelHandler;
ifnull 3
2: ldc "wss"
astore 3
3: StackMap locals: java.lang.String
StackMap stack:
aload 1
invokeinterface io.netty.handler.codec.http.HttpRequest.headers:()Lio/netty/handler/codec/http/HttpHeaders;
getstatic io.netty.handler.codec.http.HttpHeaderNames.HOST:Lio/netty/util/AsciiString;
invokevirtual io.netty.handler.codec.http.HttpHeaders.get:(Ljava/lang/CharSequence;)Ljava/lang/String;
astore 4
start local 4 4: new java.lang.StringBuilder
dup
aload 3
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "://"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 4
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 cp Lio/netty/channel/ChannelPipeline;
0 5 1 req Lio/netty/handler/codec/http/HttpRequest;
0 5 2 path Ljava/lang/String;
1 5 3 protocol Ljava/lang/String;
4 5 4 host Ljava/lang/String;
MethodParameters:
Name Flags
cp
req
path
}
SourceFile: "WebSocketServerProtocolHandshakeHandler.java"
NestMembers:
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$1
InnerClasses:
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$1