Package org.eclipse.jetty.proxy
Class AsyncProxyServlet.StreamReader
- java.lang.Object
- 
- org.eclipse.jetty.util.IteratingCallback
- 
- org.eclipse.jetty.proxy.AsyncProxyServlet.StreamReader
 
 
- 
- All Implemented Interfaces:
- java.util.EventListener,- javax.servlet.ReadListener,- Callback,- Invocable
 - Enclosing class:
- AsyncProxyServlet
 
 protected class AsyncProxyServlet.StreamReader extends IteratingCallback implements javax.servlet.ReadListener 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.eclipse.jetty.util.IteratingCallbackIteratingCallback.Action
 - 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.CallbackCallback.Completable, Callback.Completing, Callback.Nested
 - 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.InvocableInvocable.InvocationType
 
- 
 - 
Field Summary- 
Fields inherited from interface org.eclipse.jetty.util.thread.Invocable__nonBlocking
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedStreamReader(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest, DeferredContentProvider provider)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfailed(java.lang.Throwable x)Method to invoke when the asynchronous sub-task fails, or to fail the overall asynchronous task and therefore terminate the iteration.voidonAllDataRead()voidonDataAvailable()voidonError(java.lang.Throwable t)protected voidonRequestContent(javax.servlet.http.HttpServletRequest request, Request proxyRequest, DeferredContentProvider provider, byte[] buffer, int offset, int length, Callback callback)protected IteratingCallback.Actionprocess()Method called byIteratingCallback.iterate()to process the asynchronous sub-task.- 
Methods inherited from class org.eclipse.jetty.util.IteratingCallbackclose, isClosed, isFailed, isSucceeded, iterate, onCompleteFailure, onCompleteSuccess, reset, succeeded, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.jetty.util.thread.InvocablegetInvocationType
 
- 
 
- 
- 
- 
Constructor Detail- 
StreamReaderprotected StreamReader(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest, DeferredContentProvider provider)
 
- 
 - 
Method Detail- 
onDataAvailablepublic void onDataAvailable() throws java.io.IOException- Specified by:
- onDataAvailablein interface- javax.servlet.ReadListener
- Throws:
- java.io.IOException
 
 - 
onAllDataReadpublic void onAllDataRead() throws java.io.IOException- Specified by:
- onAllDataReadin interface- javax.servlet.ReadListener
- Throws:
- java.io.IOException
 
 - 
onErrorpublic void onError(java.lang.Throwable t) - Specified by:
- onErrorin interface- javax.servlet.ReadListener
 
 - 
processprotected IteratingCallback.Action process() throws java.lang.Exception Description copied from class:IteratingCallbackMethod called byIteratingCallback.iterate()to process the asynchronous sub-task.Implementations must initiate the asynchronous execution of the sub-task (if any) and return an appropriate action: - IteratingCallback.Action.IDLEwhen no sub tasks are available for execution but the overall job is not completed yet
- IteratingCallback.Action.SCHEDULEDwhen the sub task asynchronous execution has been started
- IteratingCallback.Action.SUCCEEDEDwhen the overall job is completed
 - Specified by:
- processin class- IteratingCallback
- Returns:
- the appropriate Action
- Throws:
- java.lang.Exception
 
 - 
onRequestContentprotected void onRequestContent(javax.servlet.http.HttpServletRequest request, Request proxyRequest, DeferredContentProvider provider, byte[] buffer, int offset, int length, Callback callback)
 - 
failedpublic void failed(java.lang.Throwable x) Description copied from class:IteratingCallbackMethod to invoke when the asynchronous sub-task fails, or to fail the overall asynchronous task and therefore terminate the iteration.Subclasses that override this method must always remember to call super.failed(Throwable).Eventually, IteratingCallback.onCompleteFailure(Throwable)is called, either by the caller thread or by the processing thread.- Specified by:
- failedin interface- Callback
- Overrides:
- failedin class- IteratingCallback
- Parameters:
- x- the reason for the operation failure
- See Also:
- IteratingCallback.isFailed()
 
 
- 
 
-