Package io.ryos.rhino.sdk.dsl.specs
Class HttpSpecAsyncHandler
- java.lang.Object
-
- io.ryos.rhino.sdk.dsl.specs.HttpSpecAsyncHandler
-
- All Implemented Interfaces:
org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
public class HttpSpecAsyncHandler extends java.lang.Object implements org.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
-
-
Constructor Summary
Constructors Constructor Description HttpSpecAsyncHandler(UserSession session, HttpSpec spec, EventDispatcher eventDispatcher)
-
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
-
-
-
-
Constructor Detail
-
HttpSpecAsyncHandler
public HttpSpecAsyncHandler(UserSession session, HttpSpec spec, EventDispatcher eventDispatcher)
-
-
Method Detail
-
onStatusReceived
public org.asynchttpclient.AsyncHandler.State onStatusReceived(org.asynchttpclient.HttpResponseStatus responseStatus)
- Specified by:
onStatusReceived
in interfaceorg.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
-
onHeadersReceived
public org.asynchttpclient.AsyncHandler.State onHeadersReceived(io.netty.handler.codec.http.HttpHeaders headers)
- Specified by:
onHeadersReceived
in interfaceorg.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
-
onBodyPartReceived
public org.asynchttpclient.AsyncHandler.State onBodyPartReceived(org.asynchttpclient.HttpResponseBodyPart bodyPart)
- Specified by:
onBodyPartReceived
in interfaceorg.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 interfaceorg.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
- Parameters:
t
- Throwable instance.
-
onCompleted
public org.asynchttpclient.Response onCompleted()
- Specified by:
onCompleted
in interfaceorg.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
-
completeMeasurement
public void completeMeasurement()
-
onRequestSend
public void onRequestSend(org.asynchttpclient.netty.request.NettyRequest request)
- Specified by:
onRequestSend
in interfaceorg.asynchttpclient.AsyncHandler<org.asynchttpclient.Response>
-
-