A Request. whose source is a ReactiveRequest..
| Modifier and Type | Class and Description |
|---|---|
| private class | AdapterRequestContent.Bridge
A bridge between the |
| Modifier and Type | Field and Description |
|---|---|
| private AdapterRequestContent. | |
| private static final Logger | |
| private final ReactiveRequest. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | demand(Runnable
the demand callback to invoke where there is a content chunk available runnable)Implements org. Demands to invoke the given demand callback parameter when a chunk of content is available. |
| public void | fail(Throwable
the cause of the failure failure)Implements org. Fails this content source with a |
| public String | |
| public long | |
| private AdapterRequestContent. | |
| public Content. | |
| public boolean | rewind()
Overrides default org. Rewinds this content, if possible, so that subsequent reads return chunks starting from the beginning of this content. |
| public String |
| bridge | back to summary |
|---|---|
| private AdapterRequestContent. | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| reactiveContent | back to summary |
|---|---|
| private final ReactiveRequest. | |
| AdapterRequestContent | back to summary |
|---|---|
| public AdapterRequestContent(ReactiveRequest. | |
| demand | back to summary |
|---|---|
| public void demand(Runnable runnable) Implements org. Doc from org. Demands to invoke the given demand callback parameter when a chunk of content is available. See how to use this method idiomatically. Implementations guarantee that calls to this method are safely reentrant so that
stack overflows are avoided in the case of mutual recursion between the execution of
the The demand callback may be invoked spuriously: a subsequent call to Calling this method establishes a pending demand, which is fulfilled when the demand callback is invoked. Calling this method when there is already a pending demand results in an
If the invocation of the demand callback throws an exception, then | |
| fail | back to summary |
|---|---|
| public void fail(Throwable failure) Implements org. Doc from org. Fails this content source with a The failure may be notified to the content reader at a later time, when
the content reader reads a content chunk, via a If Typical failure: the content being aborted by user code, or idle timeouts. If this method has already been called, then it is a no operation. | |
| getContentType | back to summary |
|---|---|
| public String getContentType() Overrides default org.
| |
| getLength | back to summary |
|---|---|
| public long getLength() Overrides default org.
| |
| getOrCreateBridge | back to summary |
|---|---|
| private AdapterRequestContent. | |
| read | back to summary |
|---|---|
| public Content. Implements org. Doc from org. Reads a chunk of content. See how to use this method idiomatically. The returned chunk could be:
Once a read returns an Once a read returns a The content reader code must ultimately arrange for a call to
Additionally, prior to the ultimate call to Concurrent reads from different threads are not recommended, as they are inherently in a race condition. Reads performed outside the invocation context of a
| |
| rewind | back to summary |
|---|---|
| public boolean rewind() Overrides default org. Doc from org. Rewinds this content, if possible, so that subsequent reads return chunks starting from the beginning of this content.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
A bridge between the Request. read by the HttpClient
implementation and the ReactiveRequest. provided by applications.
The first access to the Request. from the HttpClient
implementation creates the bridge and forwards the access to it, calling either
read() or demand(Runnable).
Method read() returns the current Content..
Method demand(Runnable) forwards the demand to the ReactiveRequest.,
which in turns calls onNext(Content., providing the current chunk
returned by read().
| Modifier and Type | Field and Description |
|---|---|
| private Content. | |
| private boolean | |
| private Runnable | |
| private Throwable | |
| private final SerializedInvoker | |
| private final AutoLock | |
| private Subscription |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| public void | |
| public void | onError(Throwable
the throwable signaled error)Implements org. |
| public void | onNext(Content.
the element signaled cImplements org. Publisher in response to requests to Subscription#request(long).
|
| public void | onSubscribe(Subscription
the s)Subscription that allows requesting data via Subscription#request(long)Implements org. Publisher#subscribe(Subscriber).
|
| private Content. | |
| public String |
| chunk | back to summary |
|---|---|
| private Content. | |
| complete | back to summary |
|---|---|
| private boolean complete | |
| demand | back to summary |
|---|---|
| private Runnable demand | |
| failure | back to summary |
|---|---|
| private Throwable failure | |
| invoker | back to summary |
|---|---|
| private final SerializedInvoker invoker | |
| lock | back to summary |
|---|---|
| private final AutoLock lock | |
| subscription | back to summary |
|---|---|
| private Subscription subscription | |
| Bridge | back to summary |
|---|---|
| private Bridge() | |
| demand | back to summary |
|---|---|
| private void demand(Runnable onDemand) | |
| fail | back to summary |
|---|---|
| private void fail(Throwable cause) | |
| invokeDemand | back to summary |
|---|---|
| private void invokeDemand(Runnable demand) | |
| onComplete | back to summary |
|---|---|
| public void onComplete() Implements org. Doc from org. Successful terminal state.
No further events will be sent even if
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable error) Implements org. Doc from org. Failed terminal state.
No further events will be sent even if | |
| onNext | back to summary |
|---|---|
| public void onNext(Content. Implements org. Doc from org. Data notification sent by the | |
| onSubscribe | back to summary |
|---|---|
| public void onSubscribe(Subscription s) Implements org. Doc from org. Invoked after calling
No data will start flowing until
It is the responsibility of this
The
| |
| read | back to summary |
|---|---|
| private Content. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |