Class Request.Listener.Adapter

    • Constructor Summary

      Constructors 
      Constructor Description
      Adapter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onBegin​(Request request)
      Callback method invoked when the request begins being processed in order to be sent.
      void onCommit​(Request request)
      Callback method invoked when the request headers (and perhaps small content) have been sent.
      void onContent​(Request request, java.nio.ByteBuffer content)
      Callback method invoked when a chunk of request content has been sent successfully.
      void onFailure​(Request request, java.lang.Throwable failure)
      Callback method invoked when the request has failed to be sent
      void onHeaders​(Request request)
      Callback method invoked when the request headers (and perhaps small content) are ready to be sent.
      void onQueued​(Request request)
      Callback method invoked when the request is queued, waiting to be sent
      void onSuccess​(Request request)
      Callback method invoked when the request has been successfully sent.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Adapter

        public Adapter()
    • Method Detail

      • onBegin

        public void onBegin​(Request request)
        Description copied from interface: Request.BeginListener
        Callback method invoked when the request begins being processed in order to be sent. This is the last opportunity to modify the request.
        Specified by:
        onBegin in interface Request.BeginListener
        Parameters:
        request - the request that begins being processed
      • onHeaders

        public void onHeaders​(Request request)
        Description copied from interface: Request.HeadersListener
        Callback method invoked when the request headers (and perhaps small content) are ready to be sent. The request has been converted into bytes, but not yet sent to the server, and further modifications to the request may have no effect.
        Specified by:
        onHeaders in interface Request.HeadersListener
        Parameters:
        request - the request that is about to be committed
      • onCommit

        public void onCommit​(Request request)
        Description copied from interface: Request.CommitListener
        Callback method invoked when the request headers (and perhaps small content) have been sent. The request is now committed, and in transit to the server, and further modifications to the request may have no effect.
        Specified by:
        onCommit in interface Request.CommitListener
        Parameters:
        request - the request that has been committed
      • onContent

        public void onContent​(Request request,
                              java.nio.ByteBuffer content)
        Description copied from interface: Request.ContentListener
        Callback method invoked when a chunk of request content has been sent successfully. Changes to bytes in the given buffer have no effect, as the content has already been sent.
        Specified by:
        onContent in interface Request.ContentListener
        Parameters:
        request - the request that has been committed
        content - the content
      • onFailure

        public void onFailure​(Request request,
                              java.lang.Throwable failure)
        Description copied from interface: Request.FailureListener
        Callback method invoked when the request has failed to be sent
        Specified by:
        onFailure in interface Request.FailureListener
        Parameters:
        request - the request that failed
        failure - the failure