BodySubscriber, but on
which onError(Throwable) can be invoked at any time,
even before onSubscribe(Subscription) has not been called
yet.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| public static final Comparator | |
| pack-priv static final int | |
| pack-priv final long | |
| pack-priv static final AtomicLong | |
| public static final Flow. | |
| pack-priv static final int | |
| private volatile int | |
| pack-priv static final int | |
| pack-priv volatile HttpBodySubscriberWrapper | |
| pack-priv final ReentrantLock | |
| pack-priv static final int | |
| pack-priv final HttpResponse. | |
| pack-priv volatile Throwable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | Returns: true if this subscriber's subscription has already been cancelledReturns true if this subscriber's subscription has already been cancelled. |
| public final void | |
| public final boolean | Returns: true if this subscriber has already completed, either normally or abnormallyReturns true if this subscriber has already completed, either normally or abnormally. |
| public CompletionStage | getBody()
Implements java. Returns a |
| pack-priv final long | |
| protected void | |
| private boolean | |
| private boolean | |
| private boolean | |
| private final boolean | |
| private boolean | |
| private boolean | |
| public boolean | needsExecutor()
Overrides default jdk. Returns true if getBody() should be called asynchronously. |
| protected void | |
| public void | onComplete()
Implements java. Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription. |
| public void | onError(Throwable throwable)
Implements java. Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. |
| public void | onNext(List<ByteBuffer> item)
Implements java. Method invoked with a Subscription's next item. |
| public void | onSubscribe(Flow.
Implements java. Method invoked prior to invoking any other Subscriber methods for the given Subscription. |
| protected void | onTermination()
A callback to be invoked before termination, whether due to the completion or failure of the subscriber, or cancellation of the subscription. |
| private void | |
| protected void | |
| public final boolean | Returns: true if this subscriber has already been registeredReturns true if this subscriber has already been registered. |
| public final boolean | Returns: true if this subscriber has already subscribedReturns true if this subscriber has already subscribed. |
| protected final boolean | tryRegister()
This method attempts to mark the state of this
object as registered, and then call the
|
| protected final boolean | tryUnregister()
This method attempts to mark the state of this
object as unregistered, and then call the
|
| protected void | |
| public final boolean | Returns: true if this subscriber has already been unregisteredReturns true if this subscriber has already been unregistered. |
| CANCELLED | back to summary |
|---|---|
| pack-priv static final int CANCELLED | |
| COMPARE_BY_ID | back to summary |
|---|---|
| public static final Comparator<HttpBodySubscriberWrapper<?>> COMPARE_BY_ID | |
| COMPLETED | back to summary |
|---|---|
| pack-priv static final int COMPLETED | |
| id | back to summary |
|---|---|
| pack-priv final long id | |
| IDS | back to summary |
|---|---|
| pack-priv static final AtomicLong IDS | |
| NOP | back to summary |
|---|---|
| public static final Flow. | |
| REGISTERED | back to summary |
|---|---|
| pack-priv static final int REGISTERED | |
| state | back to summary |
|---|---|
| private volatile int state | |
| SUBSCRIBED | back to summary |
|---|---|
| pack-priv static final int SUBSCRIBED | |
| subscription | back to summary |
|---|---|
| pack-priv volatile HttpBodySubscriberWrapper<T>. | |
| subscriptionLock | back to summary |
|---|---|
| pack-priv final ReentrantLock subscriptionLock | |
| UNREGISTERED | back to summary |
|---|---|
| pack-priv static final int UNREGISTERED | |
| userSubscriber | back to summary |
|---|---|
| pack-priv final HttpResponse. | |
| withError | back to summary |
|---|---|
| pack-priv volatile Throwable withError | |
| HttpBodySubscriberWrapper | back to summary |
|---|---|
| public HttpBodySubscriberWrapper(HttpResponse. | |
| cancelled | back to summary |
|---|---|
| public final boolean cancelled() Returns true if this subscriber's subscription has already been cancelled.
| |
| complete | back to summary |
|---|---|
| public final void complete(Throwable t) Complete the subscriber, either normally or exceptionally ensure that the subscriber is completed only once. Implementation Specification If not completed() yet, this method
calls
| |
| completed | back to summary |
|---|---|
| public final boolean completed() Returns true if this subscriber has already completed, either normally or abnormally.
| |
| getBody | back to summary |
|---|---|
| public CompletionStage Implements java. Doc from java. Returns a
| |
| id | back to summary |
|---|---|
| pack-priv final long id() | |
| logComplete | back to summary |
|---|---|
| protected void logComplete(Throwable error) | |
| markCancelled | back to summary |
|---|---|
| private boolean markCancelled() | |
| markCompleted | back to summary |
|---|---|
| private boolean markCompleted() | |
| markRegistered | back to summary |
|---|---|
| private boolean markRegistered() | |
| markState | back to summary |
|---|---|
| private final boolean markState(final int flag) | |
| markSubscribed | back to summary |
|---|---|
| private boolean markSubscribed() | |
| markUnregistered | back to summary |
|---|---|
| private boolean markUnregistered() | |
| needsExecutor | back to summary |
|---|---|
| public boolean needsExecutor() Overrides default jdk. Doc from jdk. Returns true if getBody() should be called asynchronously.
| |
| onCancel | back to summary |
|---|---|
| protected void onCancel() Called when the subscriber cancels its subscription. API Note This method may be used by subclasses to perform cleanup actions after a subscription has been cancelled. Implementation Specification This method calls | |
| onComplete | back to summary |
|---|---|
| public void onComplete() Implements java. Doc from java. Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription. If this method throws an exception, resulting behavior is undefined.
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable throwable) Implements java. Doc from java. Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. If this method itself throws an exception, resulting behavior is undefined.
| |
| onNext | back to summary |
|---|---|
| public void onNext(List<ByteBuffer> item) Implements java. Doc from java. Method invoked with a Subscription's next item. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription to be cancelled.
| |
| onSubscribe | back to summary |
|---|---|
| public void onSubscribe(Flow. Implements java. Doc from java. Method invoked prior to invoking any other Subscriber methods for the given Subscription. If this method throws an exception, resulting behavior is not guaranteed, but may cause the Subscription not to be established or to be cancelled. Typically, implementations of this method invoke
| |
| onTermination | back to summary |
|---|---|
| protected void onTermination() A callback to be invoked before termination, whether due to the
completion or failure of the subscriber, or cancellation of the
subscription. To be precise, this method is called before
| |
| propagateError | back to summary |
|---|---|
| private void propagateError(Throwable t) | |
| register | back to summary |
|---|---|
| protected void register() This method can be implemented by subclasses to perform registration actions. It will not be called if already registered or unregistered. API Note This method is called while holding a subscription lock.
| |
| registered | back to summary |
|---|---|
| public final boolean registered() Returns true if this subscriber has already been registered.
| |
| subscribed | back to summary |
|---|---|
| public final boolean subscribed() Returns true if this subscriber has already subscribed.
| |
| tryRegister | back to summary |
|---|---|
| protected final boolean tryRegister() This method attempts to mark the state of this
object as registered, and then call the
The state will be marked as registered, and the
| |
| tryUnregister | back to summary |
|---|---|
| protected final boolean tryUnregister() This method attempts to mark the state of this
object as unregistered, and then call the
The
| |
| unregister | back to summary |
|---|---|
| protected void unregister() This method can be implemented by subclasses to perform unregistration actions. It will not be called if not already registered, or already unregistered. API Note This method is called while holding a subscription lock.
| |
| unregistered | back to summary |
|---|---|
| public final boolean unregistered() Returns true if this subscriber has already been unregistered.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Flow. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancel()
Implements java. Causes the Subscriber to (eventually) stop receiving messages. |
| public void | request(long n)
Implements java. Adds the given number |
| subscription | back to summary |
|---|---|
| pack-priv final Flow. | |
| SubscriptionWrapper | back to summary |
|---|---|
| pack-priv SubscriptionWrapper(Flow. | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements java. Doc from java. Causes the Subscriber to (eventually) stop receiving
messages. Implementation is best-effort -- additional
messages may be received after invoking this method.
A cancelled subscription need not ever receive an
| |
| request | back to summary |
|---|---|
| public void request(long n) Implements java. Doc from java. Adds the given number
| |