protected class AsyncMiddleManServlet.ProxyReader extends IteratingCallback implements ReadListener
IteratingCallback.Action
Callback.Completable, Callback.Nested
Invocable.InvocationType
__nonBlocking
Modifier | Constructor and Description |
---|---|
protected |
ProxyReader(HttpServletRequest clientRequest,
HttpServletResponse proxyResponse,
Request proxyRequest,
DeferredContentProvider provider) |
Modifier and Type | Method and Description |
---|---|
void |
onAllDataRead() |
protected void |
onCompleteFailure(Throwable x)
Invoked when the overall task has completed with a failure.
|
void |
onDataAvailable() |
void |
onError(Throwable t) |
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
close, failed, isClosed, isFailed, isSucceeded, iterate, onCompleteSuccess, reset, succeeded, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asPreferred, getInvocationType, getInvocationType, invokeNonBlocking, invokePreferNonBlocking, invokePreferred, isNonBlockingInvocation
protected ProxyReader(HttpServletRequest clientRequest, HttpServletResponse proxyResponse, Request proxyRequest, DeferredContentProvider provider)
public void onDataAvailable() throws IOException
onDataAvailable
in interface ReadListener
IOException
public void onAllDataRead() throws IOException
onAllDataRead
in interface ReadListener
IOException
public void onError(Throwable t)
onError
in interface ReadListener
protected IteratingCallback.Action process() throws Exception
IteratingCallback
IteratingCallback.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 IteratingCallback
Exception
protected void onCompleteFailure(Throwable x)
IteratingCallback
onCompleteFailure
in class IteratingCallback
x
- the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()
Copyright © 1995–2017 Webtide. All rights reserved.