| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final ContextHandler. | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | addFailureListener(Consumer<Throwable>
the failure listener as a consumer function onFailure)Overrides org. Implements org. Adds a listener for asynchronous fatal failures. |
| public void | addIdleTimeoutListener(Predicate<TimeoutException>
the idle timeout listener as a predicate function onIdleTimeout)Overrides org. Implements org. Adds a listener for idle timeouts. |
| public void | demand(Runnable
the demand callback to invoke when there is a content chunk available. demandCallback)Overrides org. Implements org. Demands to invoke the given demand callback parameter when a chunk of content is available. |
| public Context | getContext()
Overrides org. Implements org. Get the |
| _context | back to summary |
|---|---|
| private final ContextHandler. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| ContextRequest | back to summary |
|---|---|
| protected ContextRequest(ContextHandler. | |
| addFailureListener | back to summary |
|---|---|
| public void addFailureListener(Consumer<Throwable> onFailure) Overrides org. Implements org. Doc from org. Adds a listener for asynchronous fatal failures. When a listener is called, the effects of the failure have already taken place:
Listeners are processed in the same order they are added. | |
| addIdleTimeoutListener | back to summary |
|---|---|
| public void addIdleTimeoutListener(Predicate<TimeoutException> onIdleTimeout) Overrides org. Implements org. Doc from org. Adds a listener for idle timeouts. The listener is a predicate function that should return Idle timeout listeners are only invoked if there are no pending
Listeners are processed in the same order they are added, and the first that
returns
| |
| demand | back to summary |
|---|---|
| public void demand(Runnable demandCallback) Overrides org. 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 | |
| getContext | back to summary |
|---|---|
| public Context getContext() Overrides org. Implements org. Doc from org. Get the Note that a | |
| Modifier and Type | Field and Description |
|---|---|
| private final Runnable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| _demandCallback | back to summary |
|---|---|
| private final Runnable _demandCallback | |
| OnContextDemand | back to summary |
|---|---|
| public OnContextDemand(Runnable demandCallback) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |