class sun.net.httpserver.ServerImpl$Dispatcher implements java.lang.Runnable
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: sun.net.httpserver.ServerImpl$Dispatcher
super_class: java.lang.Object
{
final sun.net.httpserver.ServerImpl this$0;
descriptor: Lsun/net/httpserver/ServerImpl;
flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lsun/net/httpserver/ServerImpl;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic sun.net.httpserver.ServerImpl$Dispatcher.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(sun.net.httpserver.ServerImpl);
descriptor: (Lsun/net/httpserver/ServerImpl;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 0: aload 0
aload 1
putfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/net/httpserver/ServerImpl$Dispatcher;
MethodParameters:
Name Flags
this$0 final
private void handleEvent(sun.net.httpserver.Event);
descriptor: (Lsun/net/httpserver/Event;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 1
getfield sun.net.httpserver.Event.exchange:Lsun/net/httpserver/ExchangeImpl;
astore 2
start local 2 1: aload 2
invokevirtual sun.net.httpserver.ExchangeImpl.getConnection:()Lsun/net/httpserver/HttpConnection;
astore 3
start local 3 2: aload 1
instanceof sun.net.httpserver.WriteFinishedEvent
ifeq 30
3: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
invokevirtual sun.net.httpserver.ServerImpl.endExchange:()I
istore 4
start local 4 4: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.terminating:Z
ifeq 6
iload 4
ifne 6
5: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
iconst_1
putfield sun.net.httpserver.ServerImpl.finished:Z
6: StackMap locals: sun.net.httpserver.ExchangeImpl sun.net.httpserver.HttpConnection int
StackMap stack:
aload 3
invokevirtual sun.net.httpserver.HttpConnection.getChannel:()Ljava/nio/channels/SocketChannel;
pop
7: aload 2
invokevirtual sun.net.httpserver.ExchangeImpl.getOriginalInputStream:()Lsun/net/httpserver/LeftOverInputStream;
astore 5
start local 5 8: aload 5
invokevirtual sun.net.httpserver.LeftOverInputStream.isEOF:()Z
ifne 10
9: aload 2
iconst_1
putfield sun.net.httpserver.ExchangeImpl.close:Z
10: StackMap locals: sun.net.httpserver.LeftOverInputStream
StackMap stack:
aload 2
getfield sun.net.httpserver.ExchangeImpl.close:Z
ifne 11
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.idleConnections:Ljava/util/Set;
invokeinterface java.util.Set.size:()I
getstatic sun.net.httpserver.ServerImpl.MAX_IDLE_CONNECTIONS:I
if_icmplt 14
11: StackMap locals:
StackMap stack:
aload 3
invokevirtual sun.net.httpserver.HttpConnection.close:()V
12: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.allConnections:Ljava/util/Set;
aload 3
invokeinterface java.util.Set.remove:(Ljava/lang/Object;)Z
pop
13: goto 30
14: StackMap locals:
StackMap stack:
aload 5
invokevirtual sun.net.httpserver.LeftOverInputStream.isDataBuffered:()Z
ifeq 17
15: aload 0
aload 3
invokevirtual sun.net.httpserver.HttpConnection.getChannel:()Ljava/nio/channels/SocketChannel;
aload 3
invokevirtual sun.net.httpserver.ServerImpl$Dispatcher.handle:(Ljava/nio/channels/SocketChannel;Lsun/net/httpserver/HttpConnection;)V
16: goto 30
17: StackMap locals:
StackMap stack:
aload 3
invokevirtual sun.net.httpserver.HttpConnection.getSelectionKey:()Ljava/nio/channels/SelectionKey;
astore 6
start local 6 18: aload 6
invokevirtual java.nio.channels.SelectionKey.isValid:()Z
ifeq 22
19: aload 6
20: aload 6
invokevirtual java.nio.channels.SelectionKey.interestOps:()I
iconst_1
ior
21: invokevirtual java.nio.channels.SelectionKey.interestOps:(I)Ljava/nio/channels/SelectionKey;
pop
22: StackMap locals: java.nio.channels.SelectionKey
StackMap stack:
aload 3
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
invokevirtual sun.net.httpserver.ServerImpl.getTime:()J
getstatic sun.net.httpserver.ServerImpl.IDLE_INTERVAL:J
ladd
putfield sun.net.httpserver.HttpConnection.time:J
23: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.idleConnections:Ljava/util/Set;
aload 3
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
end local 6 end local 5 end local 4 24: goto 30
StackMap locals: sun.net.httpserver.ServerImpl$Dispatcher sun.net.httpserver.Event sun.net.httpserver.ExchangeImpl sun.net.httpserver.HttpConnection
StackMap stack: java.io.IOException
25: astore 4
start local 4 26: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.logger:Ljava/util/logging/Logger;
27: getstatic java.util.logging.Level.FINER:Ljava/util/logging/Level;
ldc "Dispatcher (1)"
aload 4
28: invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
29: aload 3
invokevirtual sun.net.httpserver.HttpConnection.close:()V
end local 4 30: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Lsun/net/httpserver/ServerImpl$Dispatcher;
0 31 1 r Lsun/net/httpserver/Event;
1 31 2 t Lsun/net/httpserver/ExchangeImpl;
2 31 3 c Lsun/net/httpserver/HttpConnection;
4 24 4 exchanges I
8 24 5 is Lsun/net/httpserver/LeftOverInputStream;
18 24 6 key Ljava/nio/channels/SelectionKey;
26 30 4 e Ljava/io/IOException;
Exception table:
from to target type
2 24 25 Class java.io.IOException
MethodParameters:
Name Flags
r
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=7, args_size=1
start local 0 0: goto 52
1: StackMap locals:
StackMap stack:
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.lolock:Ljava/lang/Object;
dup
astore 2
monitorenter
2: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.events:Ljava/util/List;
iconst_0
invokeinterface java.util.List.remove:(I)Ljava/lang/Object;
checkcast sun.net.httpserver.Event
astore 1
start local 1 3: aload 0
aload 1
invokevirtual sun.net.httpserver.ServerImpl$Dispatcher.handleEvent:(Lsun/net/httpserver/Event;)V
4: aload 2
monitorexit
5: goto 8
end local 1 StackMap locals: sun.net.httpserver.ServerImpl$Dispatcher top java.lang.Object
StackMap stack: java.lang.Throwable
6: aload 2
monitorexit
7: athrow
8: StackMap locals: sun.net.httpserver.ServerImpl$Dispatcher
StackMap stack:
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
invokevirtual sun.net.httpserver.ServerImpl.resultSize:()I
ifgt 1
9: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.selector:Ljava/nio/channels/Selector;
ldc 1000
invokevirtual java.nio.channels.Selector.select:(J)I
pop
10: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.selector:Ljava/nio/channels/Selector;
invokevirtual java.nio.channels.Selector.selectedKeys:()Ljava/util/Set;
astore 1
start local 1 11: aload 1
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 2
start local 2 12: goto 42
13: StackMap locals: java.util.Set java.util.Iterator
StackMap stack:
aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.channels.SelectionKey
astore 3
start local 3 14: aload 2
invokeinterface java.util.Iterator.remove:()V
15: aload 3
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.listenerKey:Ljava/nio/channels/SelectionKey;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 29
16: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.terminating:Z
ifeq 18
17: goto 42
18: StackMap locals: java.nio.channels.SelectionKey
StackMap stack:
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.schan:Ljava/nio/channels/ServerSocketChannel;
invokevirtual java.nio.channels.ServerSocketChannel.accept:()Ljava/nio/channels/SocketChannel;
astore 4
start local 4 19: aload 4
ifnonnull 21
20: goto 42
21: StackMap locals: java.nio.channels.SocketChannel
StackMap stack:
aload 4
iconst_0
invokevirtual java.nio.channels.SocketChannel.configureBlocking:(Z)Ljava/nio/channels/SelectableChannel;
pop
22: aload 4
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.selector:Ljava/nio/channels/Selector;
iconst_1
invokevirtual java.nio.channels.SocketChannel.register:(Ljava/nio/channels/Selector;I)Ljava/nio/channels/SelectionKey;
astore 5
start local 5 23: new sun.net.httpserver.HttpConnection
dup
invokespecial sun.net.httpserver.HttpConnection.<init>:()V
astore 6
start local 6 24: aload 6
aload 5
putfield sun.net.httpserver.HttpConnection.selectionKey:Ljava/nio/channels/SelectionKey;
25: aload 6
aload 4
invokevirtual sun.net.httpserver.HttpConnection.setChannel:(Ljava/nio/channels/SocketChannel;)V
26: aload 5
aload 6
invokevirtual java.nio.channels.SelectionKey.attach:(Ljava/lang/Object;)Ljava/lang/Object;
pop
27: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.allConnections:Ljava/util/Set;
aload 6
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
end local 6 end local 5 end local 4 28: goto 42
29: StackMap locals:
StackMap stack:
aload 3
invokevirtual java.nio.channels.SelectionKey.isReadable:()Z
ifeq 35
30: aload 3
invokevirtual java.nio.channels.SelectionKey.channel:()Ljava/nio/channels/SelectableChannel;
checkcast java.nio.channels.SocketChannel
astore 4
start local 4 31: aload 3
invokevirtual java.nio.channels.SelectionKey.attachment:()Ljava/lang/Object;
checkcast sun.net.httpserver.HttpConnection
astore 5
start local 5 32: aload 3
iconst_0
invokevirtual java.nio.channels.SelectionKey.interestOps:(I)Ljava/nio/channels/SelectionKey;
pop
33: aload 0
aload 4
aload 5
invokevirtual sun.net.httpserver.ServerImpl$Dispatcher.handle:(Ljava/nio/channels/SocketChannel;Lsun/net/httpserver/HttpConnection;)V
end local 5 end local 4 34: goto 42
35: StackMap locals:
StackMap stack:
getstatic sun.net.httpserver.ServerImpl$Dispatcher.$assertionsDisabled:Z
ifne 42
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
36: StackMap locals:
StackMap stack: java.io.IOException
astore 4
start local 4 37: aload 3
invokevirtual java.nio.channels.SelectionKey.attachment:()Ljava/lang/Object;
checkcast sun.net.httpserver.HttpConnection
astore 5
start local 5 38: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.logger:Ljava/util/logging/Logger;
39: getstatic java.util.logging.Level.FINER:Ljava/util/logging/Level;
ldc "Dispatcher (2)"
aload 4
40: invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
41: aload 5
invokevirtual sun.net.httpserver.HttpConnection.close:()V
end local 5 end local 4 end local 3 42: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 13
end local 2 end local 1 43: goto 52
StackMap locals: sun.net.httpserver.ServerImpl$Dispatcher
StackMap stack: java.nio.channels.CancelledKeyException
44: astore 1
start local 1 45: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINER:Ljava/util/logging/Level;
ldc "Dispatcher (3)"
aload 1
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 1 46: goto 52
47: StackMap locals:
StackMap stack: java.io.IOException
astore 1
start local 1 48: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINER:Ljava/util/logging/Level;
ldc "Dispatcher (4)"
aload 1
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 1 49: goto 52
50: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 51: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINER:Ljava/util/logging/Level;
ldc "Dispatcher (7)"
aload 1
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 1 52: StackMap locals:
StackMap stack:
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.finished:Z
ifeq 8
53: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 54 0 this Lsun/net/httpserver/ServerImpl$Dispatcher;
3 6 1 r Lsun/net/httpserver/Event;
11 43 1 selected Ljava/util/Set<Ljava/nio/channels/SelectionKey;>;
12 43 2 iter Ljava/util/Iterator<Ljava/nio/channels/SelectionKey;>;
14 42 3 key Ljava/nio/channels/SelectionKey;
19 28 4 chan Ljava/nio/channels/SocketChannel;
23 28 5 newkey Ljava/nio/channels/SelectionKey;
24 28 6 c Lsun/net/httpserver/HttpConnection;
31 34 4 chan Ljava/nio/channels/SocketChannel;
32 34 5 conn Lsun/net/httpserver/HttpConnection;
37 42 4 e Ljava/io/IOException;
38 42 5 conn Lsun/net/httpserver/HttpConnection;
45 46 1 e Ljava/nio/channels/CancelledKeyException;
48 49 1 e Ljava/io/IOException;
51 52 1 e Ljava/lang/Exception;
Exception table:
from to target type
2 5 6 any
6 7 6 any
29 36 36 Class java.io.IOException
1 43 44 Class java.nio.channels.CancelledKeyException
1 43 47 Class java.io.IOException
1 43 50 Class java.lang.Exception
public void handle(java.nio.channels.SocketChannel, sun.net.httpserver.HttpConnection);
descriptor: (Ljava/nio/channels/SocketChannel;Lsun/net/httpserver/HttpConnection;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=3
start local 0 start local 1 start local 2 0: new sun.net.httpserver.ServerImpl$Exchange
dup
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
aload 1
aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.protocol:Ljava/lang/String;
aload 2
invokespecial sun.net.httpserver.ServerImpl$Exchange.<init>:(Lsun/net/httpserver/ServerImpl;Ljava/nio/channels/SocketChannel;Ljava/lang/String;Lsun/net/httpserver/HttpConnection;)V
astore 3
start local 3 1: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.executor:Ljava/util/concurrent/Executor;
aload 3
invokeinterface java.util.concurrent.Executor.execute:(Ljava/lang/Runnable;)V
end local 3 2: goto 10
StackMap locals:
StackMap stack: sun.net.httpserver.HttpError
3: astore 3
start local 3 4: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINER:Ljava/util/logging/Level;
ldc "Dispatcher (5)"
aload 3
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
5: aload 2
invokevirtual sun.net.httpserver.HttpConnection.close:()V
end local 3 6: goto 10
7: StackMap locals:
StackMap stack: java.io.IOException
astore 3
start local 3 8: aload 0
getfield sun.net.httpserver.ServerImpl$Dispatcher.this$0:Lsun/net/httpserver/ServerImpl;
getfield sun.net.httpserver.ServerImpl.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINER:Ljava/util/logging/Level;
ldc "Dispatcher (6)"
aload 3
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
9: aload 2
invokevirtual sun.net.httpserver.HttpConnection.close:()V
end local 3 10: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lsun/net/httpserver/ServerImpl$Dispatcher;
0 11 1 chan Ljava/nio/channels/SocketChannel;
0 11 2 conn Lsun/net/httpserver/HttpConnection;
1 2 3 t Lsun/net/httpserver/ServerImpl$Exchange;
4 6 3 e1 Lsun/net/httpserver/HttpError;
8 10 3 e Ljava/io/IOException;
Exception table:
from to target type
0 2 3 Class sun.net.httpserver.HttpError
0 2 7 Class java.io.IOException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
chan
conn
}
SourceFile: "ServerImpl.java"
NestHost: sun.net.httpserver.ServerImpl
InnerClasses:
Dispatcher = sun.net.httpserver.ServerImpl$Dispatcher of sun.net.httpserver.ServerImpl
Exchange = sun.net.httpserver.ServerImpl$Exchange of sun.net.httpserver.ServerImpl