Interface SdkHttpResponseHandler<T>
- 
- Type Parameters:
- T- Type of result returned in- complete(). May be- Void.
 
 public interface SdkHttpResponseHandler<T>Responsible for handling asynchronous http responses
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Tcomplete()Called when all parts of the response have been received.voidexceptionOccurred(Throwable throwable)Called when an exception occurs during the request/response.voidheadersReceived(SdkHttpResponse response)Called when the initial response with headers is received.voidonStream(org.reactivestreams.Publisher<ByteBuffer> publisher)Called when the HTTP client is ready to start sending data to the response handler.
 
- 
- 
- 
Method Detail- 
headersReceivedvoid headersReceived(SdkHttpResponse response) Called when the initial response with headers is received.- Parameters:
- response- the- SdkHttpResponse
 
 - 
onStreamvoid onStream(org.reactivestreams.Publisher<ByteBuffer> publisher) Called when the HTTP client is ready to start sending data to the response handler. Implementations must subscribe to thePublisherand request data via aSubscriptionas they can handle it.If at any time the subscriber wishes to stop receiving data, it may call Subscription.cancel(). This will be treated as a failure of the response and theexceptionOccurred(Throwable)callback will be invoked.
 - 
exceptionOccurredvoid exceptionOccurred(Throwable throwable) Called when an exception occurs during the request/response. This is a terminal method call, no other method invocations should be expected on theSdkHttpResponseHandlerafter this point.- Parameters:
- throwable- the exception that occurred.
 
 - 
completeT complete() Called when all parts of the response have been received. This is a terminal method call, no other method invocations should be expected on theSdkHttpResponseHandlerafter this point.- Returns:
- Transformed result.
 
 
- 
 
-