Class HttpSpecAsyncHandler

  • All Implemented Interfaces:
    org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>

    public class HttpSpecAsyncHandler
    extends java.lang.Object
    implements org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.asynchttpclient.AsyncHandler

        org.asynchttpclient.AsyncHandler.State
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.apache.logging.log4j.Logger LOG  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void completeMeasurement()  
      org.asynchttpclient.AsyncHandler.State onBodyPartReceived​(org.asynchttpclient.HttpResponseBodyPart bodyPart)  
      org.asynchttpclient.Response onCompleted()  
      org.asynchttpclient.AsyncHandler.State onHeadersReceived​(io.netty.handler.codec.http.HttpHeaders headers)  
      void onRequestSend​(org.asynchttpclient.netty.request.NettyRequest request)  
      org.asynchttpclient.AsyncHandler.State onStatusReceived​(org.asynchttpclient.HttpResponseStatus responseStatus)  
      void onThrowable​(java.lang.Throwable t)
      Handling the errors came out of the Http client, e.g connection timeouts.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.asynchttpclient.AsyncHandler

        onConnectionOffer, onConnectionPoolAttempt, onConnectionPooled, onHostnameResolutionAttempt, onHostnameResolutionFailure, onHostnameResolutionSuccess, onRetry, onTcpConnectAttempt, onTcpConnectFailure, onTcpConnectSuccess, onTlsHandshakeAttempt, onTlsHandshakeFailure, onTlsHandshakeSuccess, onTrailingHeadersReceived
    • Field Detail

      • LOG

        public static final org.apache.logging.log4j.Logger LOG
    • Constructor Detail

      • HttpSpecAsyncHandler

        public HttpSpecAsyncHandler​(UserSession session,
                                    HttpDsl dslItem)
    • Method Detail

      • onStatusReceived

        public org.asynchttpclient.AsyncHandler.State onStatusReceived​(org.asynchttpclient.HttpResponseStatus responseStatus)
        Specified by:
        onStatusReceived in interface org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
      • onHeadersReceived

        public org.asynchttpclient.AsyncHandler.State onHeadersReceived​(io.netty.handler.codec.http.HttpHeaders headers)
        Specified by:
        onHeadersReceived in interface org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
      • onBodyPartReceived

        public org.asynchttpclient.AsyncHandler.State onBodyPartReceived​(org.asynchttpclient.HttpResponseBodyPart bodyPart)
        Specified by:
        onBodyPartReceived in interface org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
      • onThrowable

        public void onThrowable​(java.lang.Throwable t)
        Handling the errors came out of the Http client, e.g connection timeouts.

        Specified by:
        onThrowable in interface org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
        Parameters:
        t - Throwable instance.
      • onCompleted

        public org.asynchttpclient.Response onCompleted()
        Specified by:
        onCompleted in interface org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
      • completeMeasurement

        public void completeMeasurement()
      • onRequestSend

        public void onRequestSend​(org.asynchttpclient.netty.request.NettyRequest request)
        Specified by:
        onRequestSend in interface org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>