| Modifier and Type | Class and Description |
|---|---|
| private static interface |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final HttpResponse. | |
| private long | |
| private LimitingSubscriber. |
| Access | Constructor and Description |
|---|---|
| public | LimitingSubscriber(HttpResponse.
the downstream subscriber to pass received data to downstreamSubscriber,the maximum number of bytes that are allowed capacity)
|
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| public CompletionStage | getBody()
Implements java. Returns a |
| 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> buffers)
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. |
| capacity | back to summary |
|---|---|
| private final long capacity | |
| downstreamSubscriber | back to summary |
|---|---|
| private final HttpResponse. | |
| length | back to summary |
|---|---|
| private long length | |
| state | back to summary |
|---|---|
| private LimitingSubscriber. | |
| LimitingSubscriber | back to summary |
|---|---|
public LimitingSubscriber(HttpResponse.
| |
| allocateLength | back to summary |
|---|---|
| private boolean allocateLength(List<ByteBuffer> buffers) | |
| getBody | back to summary |
|---|---|
| public CompletionStage Implements java. Doc from java. Returns a
| |
| 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> buffers) 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
| |
| Modifier and Type | Class and Description |
|---|---|
| public static record |
| Modifier and Type | Field and Description |
|---|---|
| public static final LimitingSubscriber. |
| TERMINATED | back to summary |
|---|---|
| public static final LimitingSubscriber. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Flow. | subscription
Record Component accessed by subscription(). |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public Flow. | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| subscription | back to summary |
|---|---|
| private final Flow. Record Component accessed by subscription(). | |
| Subscribed | back to summary |
|---|---|
| public Subscribed(Flow. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| subscription | back to summary |
|---|---|
| public Flow. Record Component getter of subscription. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |