Package software.amazon.awssdk.crt.s3
Interface S3MetaRequestResponseHandler
-
public interface S3MetaRequestResponseHandlerInterface called by native code to provide S3MetaRequest responses.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidonFinished(S3FinishedResponseContext context)Invoked when the entire meta request execution is complete.default voidonProgress(S3MetaRequestProgress progress)Invoked to report progress of the meta request execution.default intonResponseBody(ByteBuffer bodyBytesIn, long objectRangeStart, long objectRangeEnd)Invoked to provide the request body as it is received.default voidonResponseHeaders(int statusCode, HttpHeader[] headers)Invoked to provide response headers received during execution of the meta request, both for success and error HTTP status codes.
-
-
-
Method Detail
-
onResponseHeaders
default void onResponseHeaders(int statusCode, HttpHeader[] headers)Invoked to provide response headers received during execution of the meta request, both for success and error HTTP status codes.- Parameters:
statusCode- statusCode of the HTTP responseheaders- the headers received
-
onResponseBody
default int onResponseBody(ByteBuffer bodyBytesIn, long objectRangeStart, long objectRangeEnd)
Invoked to provide the request body as it is received.- Parameters:
bodyBytesIn- The body data for this chunk of the objectobjectRangeStart- The byte index of the object that this refers to. For example, for an HTTP message that has a range header, the first chunk received will have a range_start that matches the range header's range-startobjectRangeEnd- corresponds to the past-of-end chunk offset, i.e. objectRangeStart + the chunk length- Returns:
- The number of bytes to move the sliding window by. Repeatedly returning zero will eventually cause the sliding window to fill up and data to stop flowing until the user slides the window back open.
-
onFinished
default void onFinished(S3FinishedResponseContext context)
Invoked when the entire meta request execution is complete.- Parameters:
context- a wrapper object containing the following fields
-
onProgress
default void onProgress(S3MetaRequestProgress progress)
Invoked to report progress of the meta request execution. Currently, the progress callback is invoked only for the CopyObject meta request type. TODO: support this callback for all types of meta requests- Parameters:
progress- information about the progress of the meta request execution
-
-