public class io.netty.example.http.websocketx.client.WebSocketClientHandler extends io.netty.channel.SimpleChannelInboundHandler<java.lang.Object>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.netty.example.http.websocketx.client.WebSocketClientHandler
super_class: io.netty.channel.SimpleChannelInboundHandler
{
private final io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker;
descriptor: Lio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private io.netty.channel.ChannelPromise handshakeFuture;
descriptor: Lio/netty/channel/ChannelPromise;
flags: (0x0002) ACC_PRIVATE
public void <init>(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker);
descriptor: (Lio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker;)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.client.WebSocketClientHandler.handshaker:Lio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/netty/example/http/websocketx/client/WebSocketClientHandler;
0 3 1 handshaker Lio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker;
MethodParameters:
Name Flags
handshaker
public io.netty.channel.ChannelFuture handshakeFuture();
descriptor: ()Lio/netty/channel/ChannelFuture;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshakeFuture:Lio/netty/channel/ChannelPromise;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/example/http/websocketx/client/WebSocketClientHandler;
public void handlerAdded(io.netty.channel.ChannelHandlerContext);
descriptor: (Lio/netty/channel/ChannelHandlerContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.newPromise:()Lio/netty/channel/ChannelPromise;
putfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshakeFuture:Lio/netty/channel/ChannelPromise;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/example/http/websocketx/client/WebSocketClientHandler;
0 2 1 ctx Lio/netty/channel/ChannelHandlerContext;
MethodParameters:
Name Flags
ctx
public void channelActive(io.netty.channel.ChannelHandlerContext);
descriptor: (Lio/netty/channel/ChannelHandlerContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshaker:Lio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker;
aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.channel:()Lio/netty/channel/Channel;
invokevirtual io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.handshake:(Lio/netty/channel/Channel;)Lio/netty/channel/ChannelFuture;
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/example/http/websocketx/client/WebSocketClientHandler;
0 2 1 ctx Lio/netty/channel/ChannelHandlerContext;
MethodParameters:
Name Flags
ctx
public void channelInactive(io.netty.channel.ChannelHandlerContext);
descriptor: (Lio/netty/channel/ChannelHandlerContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "WebSocket Client disconnected!"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/example/http/websocketx/client/WebSocketClientHandler;
0 2 1 ctx Lio/netty/channel/ChannelHandlerContext;
MethodParameters:
Name Flags
ctx
public void channelRead0(io.netty.channel.ChannelHandlerContext, java.lang.Object);
descriptor: (Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.channel:()Lio/netty/channel/Channel;
astore 3
start local 3 1: aload 0
getfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshaker:Lio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker;
invokevirtual io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.isHandshakeComplete:()Z
ifne 10
2: aload 0
getfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshaker:Lio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker;
aload 3
aload 2
checkcast io.netty.handler.codec.http.FullHttpResponse
invokevirtual io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.finishHandshake:(Lio/netty/channel/Channel;Lio/netty/handler/codec/http/FullHttpResponse;)V
3: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "WebSocket Client connected!"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
4: aload 0
getfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshakeFuture:Lio/netty/channel/ChannelPromise;
invokeinterface io.netty.channel.ChannelPromise.setSuccess:()Lio/netty/channel/ChannelPromise;
pop
5: goto 9
StackMap locals: io.netty.example.http.websocketx.client.WebSocketClientHandler io.netty.channel.ChannelHandlerContext java.lang.Object io.netty.channel.Channel
StackMap stack: io.netty.handler.codec.http.websocketx.WebSocketHandshakeException
6: astore 4
start local 4 7: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "WebSocket Client failed to connect"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
8: aload 0
getfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshakeFuture:Lio/netty/channel/ChannelPromise;
aload 4
invokeinterface io.netty.channel.ChannelPromise.setFailure:(Ljava/lang/Throwable;)Lio/netty/channel/ChannelPromise;
pop
end local 4 9: StackMap locals:
StackMap stack:
return
10: StackMap locals:
StackMap stack:
aload 2
instanceof io.netty.handler.codec.http.FullHttpResponse
ifeq 17
11: aload 2
checkcast io.netty.handler.codec.http.FullHttpResponse
astore 4
start local 4 12: new java.lang.IllegalStateException
dup
13: new java.lang.StringBuilder
dup
ldc "Unexpected FullHttpResponse (getStatus="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
invokeinterface io.netty.handler.codec.http.FullHttpResponse.status:()Lio/netty/handler/codec/http/HttpResponseStatus;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
14: ldc ", content="
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 4
invokeinterface io.netty.handler.codec.http.FullHttpResponse.content:()Lio/netty/buffer/ByteBuf;
getstatic io.netty.util.CharsetUtil.UTF_8:Ljava/nio/charset/Charset;
invokevirtual io.netty.buffer.ByteBuf.toString:(Ljava/nio/charset/Charset;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
bipush 41
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
15: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
16: invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
end local 4 17: StackMap locals:
StackMap stack:
aload 2
checkcast io.netty.handler.codec.http.websocketx.WebSocketFrame
astore 4
start local 4 18: aload 4
instanceof io.netty.handler.codec.http.websocketx.TextWebSocketFrame
ifeq 22
19: aload 4
checkcast io.netty.handler.codec.http.websocketx.TextWebSocketFrame
astore 5
start local 5 20: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "WebSocket Client received message: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
invokevirtual io.netty.handler.codec.http.websocketx.TextWebSocketFrame.text:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
end local 5 21: goto 28
StackMap locals: io.netty.handler.codec.http.websocketx.WebSocketFrame
StackMap stack:
22: aload 4
instanceof io.netty.handler.codec.http.websocketx.PongWebSocketFrame
ifeq 25
23: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "WebSocket Client received pong"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
24: goto 28
StackMap locals:
StackMap stack:
25: aload 4
instanceof io.netty.handler.codec.http.websocketx.CloseWebSocketFrame
ifeq 28
26: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "WebSocket Client received closing"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
27: aload 3
invokeinterface io.netty.channel.Channel.close:()Lio/netty/channel/ChannelFuture;
pop
28: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 this Lio/netty/example/http/websocketx/client/WebSocketClientHandler;
0 29 1 ctx Lio/netty/channel/ChannelHandlerContext;
0 29 2 msg Ljava/lang/Object;
1 29 3 ch Lio/netty/channel/Channel;
7 9 4 e Lio/netty/handler/codec/http/websocketx/WebSocketHandshakeException;
12 17 4 response Lio/netty/handler/codec/http/FullHttpResponse;
18 29 4 frame Lio/netty/handler/codec/http/websocketx/WebSocketFrame;
20 21 5 textFrame Lio/netty/handler/codec/http/websocketx/TextWebSocketFrame;
Exception table:
from to target type
2 5 6 Class io.netty.handler.codec.http.websocketx.WebSocketHandshakeException
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
ctx
msg
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=2, 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 0
getfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshakeFuture:Lio/netty/channel/ChannelPromise;
invokeinterface io.netty.channel.ChannelPromise.isDone:()Z
ifne 3
2: aload 0
getfield io.netty.example.http.websocketx.client.WebSocketClientHandler.handshakeFuture:Lio/netty/channel/ChannelPromise;
aload 2
invokeinterface io.netty.channel.ChannelPromise.setFailure:(Ljava/lang/Throwable;)Lio/netty/channel/ChannelPromise;
pop
3: StackMap locals:
StackMap stack:
aload 1
invokeinterface io.netty.channel.ChannelHandlerContext.close:()Lio/netty/channel/ChannelFuture;
pop
4: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/netty/example/http/websocketx/client/WebSocketClientHandler;
0 5 1 ctx Lio/netty/channel/ChannelHandlerContext;
0 5 2 cause Ljava/lang/Throwable;
MethodParameters:
Name Flags
ctx
cause
}
Signature: Lio/netty/channel/SimpleChannelInboundHandler<Ljava/lang/Object;>;
SourceFile: "WebSocketClientHandler.java"