private class ProxyServlet.DelegatingContentProvider extends IteratingCallback implements AsyncContentProvider.Listener
IteratingCallback.ActionCallback.Completable, Callback.NestedInvocable.InvocationType| Modifier and Type | Field and Description |
|---|---|
private javax.servlet.http.HttpServletRequest |
clientRequest |
private DeferredContentProvider |
deferred |
private java.util.Iterator<java.nio.ByteBuffer> |
iterator |
private Request |
proxyRequest |
private javax.servlet.http.HttpServletResponse |
proxyResponse |
__nonBlocking| Modifier | Constructor and Description |
|---|---|
private |
DelegatingContentProvider(javax.servlet.http.HttpServletRequest clientRequest,
Request proxyRequest,
javax.servlet.http.HttpServletResponse proxyResponse,
ContentProvider provider,
DeferredContentProvider deferred) |
| Modifier and Type | Method and Description |
|---|---|
Invocable.InvocationType |
getInvocationType() |
protected void |
onCompleteFailure(java.lang.Throwable failure)
Invoked when the overall task has completed with a failure.
|
protected void |
onCompleteSuccess()
Invoked when the overall task has completed successfully.
|
void |
onContent()
Callback method invoked when content is available
|
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
void |
succeeded()
Invoked when the sub task succeeds.
|
close, failed, isClosed, isFailed, isSucceeded, iterate, reset, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInvocationType, invokeNonBlocking, isNonBlockingInvocationprivate final javax.servlet.http.HttpServletRequest clientRequest
private final Request proxyRequest
private final javax.servlet.http.HttpServletResponse proxyResponse
private final java.util.Iterator<java.nio.ByteBuffer> iterator
private final DeferredContentProvider deferred
private DelegatingContentProvider(javax.servlet.http.HttpServletRequest clientRequest,
Request proxyRequest,
javax.servlet.http.HttpServletResponse proxyResponse,
ContentProvider provider,
DeferredContentProvider deferred)
protected IteratingCallback.Action process() throws java.lang.Exception
IteratingCallbackIteratingCallback.iterate() to process the sub task.
Implementations must start the asynchronous execution of the sub task (if any) and return an appropriate action:
IteratingCallback.Action.IDLE when no sub tasks are available for execution
but the overall job is not completed yetIteratingCallback.Action.SCHEDULED when the sub task asynchronous execution
has been startedIteratingCallback.Action.SUCCEEDED when the overall job is completedprocess in class IteratingCallbackjava.lang.Exceptionpublic void succeeded()
IteratingCallbacksuper.succeeded().succeeded in interface Callbacksucceeded in class IteratingCallbackCallback.failed(Throwable)protected void onCompleteSuccess()
IteratingCallbackonCompleteSuccess in class IteratingCallbackIteratingCallback.onCompleteFailure(Throwable)protected void onCompleteFailure(java.lang.Throwable failure)
IteratingCallbackonCompleteFailure in class IteratingCallbackfailure - the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()public Invocable.InvocationType getInvocationType()
getInvocationType in interface Invocablepublic void onContent()
AsyncContentProvider.ListeneronContent in interface AsyncContentProvider.Listener