public class io.netty.example.http.websocketx.server.WebSocketIndexPageHandler extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.netty.example.http.websocketx.server.WebSocketIndexPageHandler
super_class: io.netty.channel.SimpleChannelInboundHandler
{
private final java.lang.String websocketPath;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial io.netty.channel.SimpleChannelInboundHandler.<init>:()V
1: aload 0
aload 1
putfield io.netty.example.http.websocketx.server.WebSocketIndexPageHandler.websocketPath:Ljava/lang/String;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/netty/example/http/websocketx/server/WebSocketIndexPageHandler;
0 3 1 websocketPath Ljava/lang/String;
MethodParameters:
Name Flags
websocketPath
protected void channelRead0(io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.http.FullHttpRequest);
descriptor: (Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokeinterface io.netty.handler.codec.http.FullHttpRequest.decoderResult:()Lio/netty/handler/codec/DecoderResult;
invokevirtual io.netty.handler.codec.DecoderResult.isSuccess:()Z
ifne 3
1: aload 1
aload 2
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.BAD_REQUEST: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.example.http.websocketx.server.WebSocketIndexPageHandler.sendHttpResponse:(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;Lio/netty/handler/codec/http/FullHttpResponse;)V
2: return
3: StackMap locals:
StackMap stack:
aload 2
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 6
4: aload 1
aload 2
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.example.http.websocketx.server.WebSocketIndexPageHandler.sendHttpResponse:(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;Lio/netty/handler/codec/http/FullHttpResponse;)V
5: return
6: StackMap locals:
StackMap stack:
ldc "/"
aload 2
invokeinterface io.netty.handler.codec.http.FullHttpRequest.uri:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 7
ldc "/index.html"
aload 2
invokeinterface io.netty.handler.codec.http.FullHttpRequest.uri:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 14
7: StackMap locals:
StackMap stack:
aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.pipeline:()Lio/netty/channel/ChannelPipeline;
aload 2
aload 0
getfield io.netty.example.http.websocketx.server.WebSocketIndexPageHandler.websocketPath:Ljava/lang/String;
invokestatic io.netty.example.http.websocketx.server.WebSocketIndexPageHandler.getWebSocketLocation:(Lio/netty/channel/ChannelPipeline;Lio/netty/handler/codec/http/HttpRequest;Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 8: aload 3
invokestatic io.netty.example.http.websocketx.server.WebSocketServerIndexPage.getContent:(Ljava/lang/String;)Lio/netty/buffer/ByteBuf;
astore 4
start local 4 9: 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.OK:Lio/netty/handler/codec/http/HttpResponseStatus;
aload 4
invokespecial io.netty.handler.codec.http.DefaultFullHttpResponse.<init>:(Lio/netty/handler/codec/http/HttpVersion;Lio/netty/handler/codec/http/HttpResponseStatus;Lio/netty/buffer/ByteBuf;)V
astore 5
start local 5 10: aload 5
invokeinterface io.netty.handler.codec.http.FullHttpResponse.headers:()Lio/netty/handler/codec/http/HttpHeaders;
getstatic io.netty.handler.codec.http.HttpHeaderNames.CONTENT_TYPE:Lio/netty/util/AsciiString;
ldc "text/html; charset=UTF-8"
invokevirtual io.netty.handler.codec.http.HttpHeaders.set:(Ljava/lang/CharSequence;Ljava/lang/Object;)Lio/netty/handler/codec/http/HttpHeaders;
pop
11: aload 5
aload 4
invokevirtual io.netty.buffer.ByteBuf.readableBytes:()I
i2l
invokestatic io.netty.handler.codec.http.HttpUtil.setContentLength:(Lio/netty/handler/codec/http/HttpMessage;J)V
12: aload 1
aload 2
aload 5
invokestatic io.netty.example.http.websocketx.server.WebSocketIndexPageHandler.sendHttpResponse:(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;Lio/netty/handler/codec/http/FullHttpResponse;)V
end local 5 end local 4 end local 3 13: goto 15
14: StackMap locals:
StackMap stack:
aload 1
aload 2
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.NOT_FOUND: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.example.http.websocketx.server.WebSocketIndexPageHandler.sendHttpResponse:(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;Lio/netty/handler/codec/http/FullHttpResponse;)V
15: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lio/netty/example/http/websocketx/server/WebSocketIndexPageHandler;
0 16 1 ctx Lio/netty/channel/ChannelHandlerContext;
0 16 2 req Lio/netty/handler/codec/http/FullHttpRequest;
8 13 3 webSocketLocation Ljava/lang/String;
9 13 4 content Lio/netty/buffer/ByteBuf;
10 13 5 res Lio/netty/handler/codec/http/FullHttpResponse;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
ctx
req
public void exceptionCaught(io.netty.channel.ChannelHandlerContext, java.lang.Throwable);
descriptor: (Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokevirtual java.lang.Throwable.printStackTrace:()V
1: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.close:()Lio/netty/channel/ChannelFuture;
pop
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/netty/example/http/websocketx/server/WebSocketIndexPageHandler;
0 3 1 ctx Lio/netty/channel/ChannelHandlerContext;
0 3 2 cause Ljava/lang/Throwable;
MethodParameters:
Name Flags
ctx
cause
private static void sendHttpResponse(io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.http.FullHttpRequest, io.netty.handler.codec.http.FullHttpResponse);
descriptor: (Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;Lio/netty/handler/codec/http/FullHttpResponse;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokeinterface io.netty.handler.codec.http.FullHttpResponse.status:()Lio/netty/handler/codec/http/HttpResponseStatus;
invokevirtual io.netty.handler.codec.http.HttpResponseStatus.code:()I
sipush 200
if_icmpeq 5
1: aload 2
invokeinterface io.netty.handler.codec.http.FullHttpResponse.status:()Lio/netty/handler/codec/http/HttpResponseStatus;
invokevirtual io.netty.handler.codec.http.HttpResponseStatus.toString:()Ljava/lang/String;
getstatic io.netty.util.CharsetUtil.UTF_8:Ljava/nio/charset/Charset;
invokestatic io.netty.buffer.Unpooled.copiedBuffer:(Ljava/lang/CharSequence;Ljava/nio/charset/Charset;)Lio/netty/buffer/ByteBuf;
astore 3
start local 3 2: aload 2
invokeinterface io.netty.handler.codec.http.FullHttpResponse.content:()Lio/netty/buffer/ByteBuf;
aload 3
invokevirtual io.netty.buffer.ByteBuf.writeBytes:(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf;
pop
3: aload 3
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
4: aload 2
aload 2
invokeinterface io.netty.handler.codec.http.FullHttpResponse.content:()Lio/netty/buffer/ByteBuf;
invokevirtual io.netty.buffer.ByteBuf.readableBytes:()I
i2l
invokestatic io.netty.handler.codec.http.HttpUtil.setContentLength:(Lio/netty/handler/codec/http/HttpMessage;J)V
end local 3 5: StackMap locals:
StackMap stack:
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 6: aload 1
invokestatic io.netty.handler.codec.http.HttpUtil.isKeepAlive:(Lio/netty/handler/codec/http/HttpMessage;)Z
ifeq 7
aload 2
invokeinterface io.netty.handler.codec.http.FullHttpResponse.status:()Lio/netty/handler/codec/http/HttpResponseStatus;
invokevirtual io.netty.handler.codec.http.HttpResponseStatus.code:()I
sipush 200
if_icmpeq 8
7: 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
8: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 ctx Lio/netty/channel/ChannelHandlerContext;
0 9 1 req Lio/netty/handler/codec/http/FullHttpRequest;
0 9 2 res Lio/netty/handler/codec/http/FullHttpResponse;
2 5 3 buf Lio/netty/buffer/ByteBuf;
6 9 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=4, 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:
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 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;
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 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 cp Lio/netty/channel/ChannelPipeline;
0 4 1 req Lio/netty/handler/codec/http/HttpRequest;
0 4 2 path Ljava/lang/String;
1 4 3 protocol Ljava/lang/String;
MethodParameters:
Name Flags
cp
req
path
protected void channelRead0(io.netty.channel.ChannelHandlerContext, java.lang.Object);
descriptor: (Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V
flags: (0x1044) ACC_PROTECTED, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
0: aload 0
aload 1
aload 2
checkcast io.netty.handler.codec.http.FullHttpRequest
invokevirtual io.netty.example.http.websocketx.server.WebSocketIndexPageHandler.channelRead0:(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;)V
return
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.lang.Exception
}
Signature: Lio/netty/channel/SimpleChannelInboundHandler<Lio/netty/handler/codec/http/FullHttpRequest;>;
SourceFile: "WebSocketIndexPageHandler.java"