Interface S3MetaRequestResponseHandler


  • public interface S3MetaRequestResponseHandler
    Interface called by native code to provide S3MetaRequest responses.
    • 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 response
        headers - 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 object
        objectRangeStart - 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-start
        objectRangeEnd - 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