public final class jdk.incubator.http.internal.websocket.CooperativeHandler
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.incubator.http.internal.websocket.CooperativeHandler
super_class: java.lang.Object
{
private static final int OFFLOAD;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1
private static final int AGAIN;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2
private static final int BEGIN;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4
private static final int STOP;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 8
private static final int END;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 16
private final java.util.concurrent.atomic.AtomicInteger state;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.function.Consumer<java.lang.Runnable> begin;
descriptor: Ljava/util/function/Consumer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Consumer<Ljava/lang/Runnable;>;
public void <init>(java.lang.Runnable);
descriptor: (Ljava/lang/Runnable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic jdk.incubator.http.internal.websocket.CooperativeHandler.asyncOf:(Ljava/lang/Runnable;)Ljava/util/function/Consumer;
invokespecial jdk.incubator.http.internal.websocket.CooperativeHandler.<init>:(Ljava/util/function/Consumer;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/http/internal/websocket/CooperativeHandler;
0 2 1 task Ljava/lang/Runnable;
MethodParameters:
Name Flags
task
public void <init>(java.util.function.Consumer<java.lang.Runnable>);
descriptor: (Ljava/util/function/Consumer;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
bipush 16
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
2: aload 0
aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.function.Consumer
putfield jdk.incubator.http.internal.websocket.CooperativeHandler.begin:Ljava/util/function/Consumer;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/incubator/http/internal/websocket/CooperativeHandler;
0 4 1 begin Ljava/util/function/Consumer<Ljava/lang/Runnable;>;
Signature: (Ljava/util/function/Consumer<Ljava/lang/Runnable;>;)V
MethodParameters:
Name Flags
begin
public void handle();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
istore 1
start local 1 1: iload 1
bipush 16
if_icmpne 4
2: aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
bipush 16
iconst_4
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 0
3: goto 10
4: StackMap locals: int
StackMap stack:
iload 1
iconst_4
iand
ifeq 7
5: aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
iload 1
iconst_2
iload 1
iconst_1
iand
ior
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 0
6: return
7: StackMap locals:
StackMap stack:
iload 1
iconst_2
iand
ifne 8
iload 1
bipush 8
if_icmpne 9
8: StackMap locals:
StackMap stack:
return
9: StackMap locals:
StackMap stack:
new java.lang.InternalError
dup
iload 1
invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
end local 1 10: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.begin:Ljava/util/function/Consumer;
aload 0
invokedynamic run(Ljdk/incubator/http/internal/websocket/CooperativeHandler;)Ljava/lang/Runnable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
jdk/incubator/http/internal/websocket/CooperativeHandler.tryEnd()V (7)
()V
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
11: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/incubator/http/internal/websocket/CooperativeHandler;
1 10 1 s I
private void tryEnd();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: goto 3
start local 1 1: StackMap locals: int
StackMap stack:
aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
iload 1
iload 1
bipush -2
iand
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 3
2: return
end local 1 3: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
dup
istore 1
start local 1 4: iconst_1
iand
ifne 1
5: StackMap locals: int
StackMap stack:
iload 1
iconst_4
if_icmpne 8
6: aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_4
bipush 16
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 14
7: return
8: StackMap locals:
StackMap stack:
iload 1
iconst_2
if_icmpne 11
9: aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_2
iconst_5
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 14
10: goto 16
11: StackMap locals:
StackMap stack:
iload 1
bipush 8
if_icmpne 13
12: return
13: StackMap locals:
StackMap stack:
new java.lang.InternalError
dup
iload 1
invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
istore 1
15: goto 5
16: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.begin:Ljava/util/function/Consumer;
aload 0
invokedynamic run(Ljdk/incubator/http/internal/websocket/CooperativeHandler;)Ljava/lang/Runnable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
jdk/incubator/http/internal/websocket/CooperativeHandler.tryEnd()V (7)
()V
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 1 17: goto 3
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Ljdk/incubator/http/internal/websocket/CooperativeHandler;
1 3 1 s I
4 17 1 s I
public boolean isStopped();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
bipush 8
if_icmpne 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/http/internal/websocket/CooperativeHandler;
public void stop();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
bipush 8
invokevirtual java.util.concurrent.atomic.AtomicInteger.set:(I)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/http/internal/websocket/CooperativeHandler;
private static java.util.function.Consumer<java.lang.Runnable> asyncOf(java.lang.Runnable);
descriptor: (Ljava/lang/Runnable;)Ljava/util/function/Consumer;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
invokedynamic accept(Ljava/lang/Runnable;)Ljava/util/function/Consumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
jdk/incubator/http/internal/websocket/CooperativeHandler.lambda$2(Ljava/lang/Runnable;Ljava/lang/Runnable;)V (6)
(Ljava/lang/Runnable;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 task Ljava/lang/Runnable;
Signature: (Ljava/lang/Runnable;)Ljava/util/function/Consumer<Ljava/lang/Runnable;>;
MethodParameters:
Name Flags
task
private static void lambda$2(java.lang.Runnable, java.lang.Runnable);
descriptor: (Ljava/lang/Runnable;Ljava/lang/Runnable;)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=1, locals=2, args_size=2
start local 1 0: aload 0
invokeinterface java.lang.Runnable.run:()V
1: aload 1
invokeinterface java.lang.Runnable.run:()V
2: return
end local 1 LocalVariableTable:
Start End Slot Name Signature
0 3 1 ender Ljava/lang/Runnable;
}
SourceFile: "CooperativeHandler.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles