Top Description Constructors Methods
com.oracle.bmc.responses.internal

public Class StreamClosingAsyncHandler<REQUEST extends BmcRequest<?>, RESPONSE>

extends ForwardingAsyncHandler<REQUEST extends BmcRequest<?>, RESPONSE>
Class Inheritance
Type Parameters
<REQUEST>
type of the request
<RESPONSE>
type of the response
Imports
java.io.InputStream, com.oracle.bmc.requests.BmcRequest, com.oracle.bmc.responses.AsyncHandler

A wrapper around an async handler that closes the stream at the end of a request, if the body is a stream.

Constructor Summary

AccessConstructor and Description
public
StreamClosingAsyncHandler(AsyncHandler<REQUEST, RESPONSE> delegate)

Method Summary

Modifier and TypeMethod and Description
public void
onError(REQUEST
The request that was made.
request
,
Throwable
The error that was received.
error
)

Overrides com.oracle.bmc.responses.internal.ForwardingAsyncHandler.onError.

Implements com.oracle.bmc.responses.AsyncHandler.onError.

Called if the request could not be completed successfully.

public void
onSuccess(REQUEST
The request that was made.
request
,
RESPONSE
The response that was received.
response
)

Overrides com.oracle.bmc.responses.internal.ForwardingAsyncHandler.onSuccess.

Implements com.oracle.bmc.responses.AsyncHandler.onSuccess.

Called if the request was successfully completed.

Constructor Detail

StreamClosingAsyncHandlerback to summary
public StreamClosingAsyncHandler(AsyncHandler<REQUEST, RESPONSE> delegate)

Method Detail

onErrorback to summary
public void onError(REQUEST request, Throwable error)

Overrides com.oracle.bmc.responses.internal.ForwardingAsyncHandler.onError.

Implements com.oracle.bmc.responses.AsyncHandler.onError.

Doc from com.oracle.bmc.responses.AsyncHandler.onError.

Called if the request could not be completed successfully.

Parameters
request:REQUEST

The request that was made.

error:Throwable

The error that was received.

Annotations
@Override
onSuccessback to summary
public void onSuccess(REQUEST request, RESPONSE response)

Overrides com.oracle.bmc.responses.internal.ForwardingAsyncHandler.onSuccess.

Implements com.oracle.bmc.responses.AsyncHandler.onSuccess.

Doc from com.oracle.bmc.responses.AsyncHandler.onSuccess.

Called if the request was successfully completed.

Parameters
request:REQUEST

The request that was made.

response:RESPONSE

The response that was received.

Annotations
@Override