class jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber implements jdk.incubator.http.HttpResponse$BodySubscriber<java.lang.Void>
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber
super_class: java.lang.Object
{
private final java.util.function.Consumer<java.util.Optional<byte[]>> consumer;
descriptor: Ljava/util/function/Consumer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Consumer<Ljava/util/Optional<[B>;>;
private java.util.concurrent.Flow$Subscription subscription;
descriptor: Ljava/util/concurrent/Flow$Subscription;
flags: (0x0002) ACC_PRIVATE
private final java.util.concurrent.CompletableFuture<java.lang.Void> result;
descriptor: Ljava/util/concurrent/CompletableFuture;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/CompletableFuture<Ljava/lang/Void;>;
private final java.util.concurrent.atomic.AtomicBoolean subscribed;
descriptor: Ljava/util/concurrent/atomic/AtomicBoolean;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void <init>(java.util.function.Consumer<java.util.Optional<byte[]>>);
descriptor: (Ljava/util/function/Consumer;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new jdk.incubator.http.internal.common.MinimalFuture
dup
invokespecial jdk.incubator.http.internal.common.MinimalFuture.<init>:()V
putfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.result:Ljava/util/concurrent/CompletableFuture;
2: aload 0
new java.util.concurrent.atomic.AtomicBoolean
dup
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:()V
putfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.subscribed:Ljava/util/concurrent/atomic/AtomicBoolean;
3: aload 0
aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.function.Consumer
putfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.consumer:Ljava/util/function/Consumer;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/http/ResponseSubscribers$ConsumerSubscriber;
0 5 1 consumer Ljava/util/function/Consumer<Ljava/util/Optional<[B>;>;
Signature: (Ljava/util/function/Consumer<Ljava/util/Optional<[B>;>;)V
MethodParameters:
Name Flags
consumer
public java.util.concurrent.CompletionStage<java.lang.Void> getBody();
descriptor: ()Ljava/util/concurrent/CompletionStage;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.result:Ljava/util/concurrent/CompletableFuture;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/http/ResponseSubscribers$ConsumerSubscriber;
Signature: ()Ljava/util/concurrent/CompletionStage<Ljava/lang/Void;>;
public void onSubscribe(java.util.concurrent.Flow$Subscription);
descriptor: (Ljava/util/concurrent/Flow$Subscription;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.subscribed:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifne 3
1: aload 1
invokeinterface java.util.concurrent.Flow$Subscription.cancel:()V
2: goto 5
3: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.subscription:Ljava/util/concurrent/Flow$Subscription;
4: aload 1
lconst_1
invokeinterface java.util.concurrent.Flow$Subscription.request:(J)V
5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/incubator/http/ResponseSubscribers$ConsumerSubscriber;
0 6 1 subscription Ljava/util/concurrent/Flow$Subscription;
MethodParameters:
Name Flags
subscription
public void onNext(java.util.List<java.nio.ByteBuffer>);
descriptor: (Ljava/util/List;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 5
StackMap locals: jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber java.util.List top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.ByteBuffer
astore 2
start local 2 2: aload 2
invokevirtual java.nio.ByteBuffer.remaining:()I
newarray 8
astore 4
start local 4 3: aload 2
aload 4
invokevirtual java.nio.ByteBuffer.get:([B)Ljava/nio/ByteBuffer;
pop
4: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.consumer:Ljava/util/function/Consumer;
aload 4
invokestatic java.util.Optional.of:(Ljava/lang/Object;)Ljava/util/Optional;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 4 end local 2 5: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
6: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.subscription:Ljava/util/concurrent/Flow$Subscription;
lconst_1
invokeinterface java.util.concurrent.Flow$Subscription.request:(J)V
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/incubator/http/ResponseSubscribers$ConsumerSubscriber;
0 8 1 items Ljava/util/List<Ljava/nio/ByteBuffer;>;
2 5 2 item Ljava/nio/ByteBuffer;
3 5 4 buf [B
Signature: (Ljava/util/List<Ljava/nio/ByteBuffer;>;)V
MethodParameters:
Name Flags
items
public void onError(java.lang.Throwable);
descriptor: (Ljava/lang/Throwable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.result:Ljava/util/concurrent/CompletableFuture;
aload 1
invokevirtual java.util.concurrent.CompletableFuture.completeExceptionally:(Ljava/lang/Throwable;)Z
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/http/ResponseSubscribers$ConsumerSubscriber;
0 2 1 throwable Ljava/lang/Throwable;
MethodParameters:
Name Flags
throwable
public void onComplete();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.consumer:Ljava/util/function/Consumer;
invokestatic java.util.Optional.empty:()Ljava/util/Optional;
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
1: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.result:Ljava/util/concurrent/CompletableFuture;
aconst_null
invokevirtual java.util.concurrent.CompletableFuture.complete:(Ljava/lang/Object;)Z
pop
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/incubator/http/ResponseSubscribers$ConsumerSubscriber;
public void onNext(java.lang.Object);
descriptor: (Ljava/lang/Object;)V
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
checkcast java.util.List
invokevirtual jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber.onNext:(Ljava/util/List;)V
return
LocalVariableTable:
Start End Slot Name Signature
}
Signature: Ljava/lang/Object;Ljdk/incubator/http/HttpResponse$BodySubscriber<Ljava/lang/Void;>;
SourceFile: "ResponseSubscribers.java"
NestHost: jdk.incubator.http.ResponseSubscribers
InnerClasses:
public abstract Subscription = java.util.concurrent.Flow$Subscription of java.util.concurrent.Flow
public abstract BodySubscriber = jdk.incubator.http.HttpResponse$BodySubscriber of jdk.incubator.http.HttpResponse
ConsumerSubscriber = jdk.incubator.http.ResponseSubscribers$ConsumerSubscriber of jdk.incubator.http.ResponseSubscribers