Class AsyncProxyServlet.StreamReader

java.lang.Object
org.eclipse.jetty.util.IteratingCallback
org.eclipse.jetty.proxy.AsyncProxyServlet.StreamReader
All Implemented Interfaces:
EventListener, javax.servlet.ReadListener, Callback, Invocable
Enclosing class:
AsyncProxyServlet

protected class AsyncProxyServlet.StreamReader extends IteratingCallback implements javax.servlet.ReadListener
  • Constructor Details

    • StreamReader

      protected StreamReader(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest, AsyncRequestContent content)
  • Method Details

    • onDataAvailable

      public void onDataAvailable()
      Specified by:
      onDataAvailable in interface javax.servlet.ReadListener
    • onAllDataRead

      public void onAllDataRead()
      Specified by:
      onAllDataRead in interface javax.servlet.ReadListener
    • onError

      public void onError(Throwable t)
      Specified by:
      onError in interface javax.servlet.ReadListener
    • process

      protected IteratingCallback.Action process() throws Exception
      Description copied from class: IteratingCallback
      Method called by IteratingCallback.iterate() to process the sub task.

      Implementations must start the asynchronous execution of the sub task (if any) and return an appropriate action:

      Specified by:
      process in class IteratingCallback
      Returns:
      the appropriate Action
      Throws:
      Exception
    • onRequestContent

      protected void onRequestContent(javax.servlet.http.HttpServletRequest request, Request proxyRequest, AsyncRequestContent content, byte[] buffer, int offset, int length, Callback callback)
    • failed

      public void failed(Throwable x)
      Description copied from class: IteratingCallback
      Invoked when the sub task fails. Subclasses that override this method must always remember to call super.failed(Throwable).
      Specified by:
      failed in interface Callback
      Overrides:
      failed in class IteratingCallback
      Parameters:
      x - the reason for the operation failure