Class ProgressSupport

java.lang.Object
com.amazonaws.event.request.Progress
com.amazonaws.event.request.ProgressSupport

public class ProgressSupport extends Progress
An actual implementation to represent the progress of a request/response.
  • Constructor Details

    • ProgressSupport

      public ProgressSupport()
  • Method Details

    • getRequestContentLength

      public long getRequestContentLength()
      Returns the number of bytes to be expected in the request, or -1 if the number is unknown (e.g. when the request is still not serialized yet, or when the request contains raw InputStream as the payload in which case the SDK cannot infer the content-length in advance).
      Overrides:
      getRequestContentLength in class Progress
    • addRequestContentLength

      public void addRequestContentLength(long contentLength)
      Adds the number of bytes to be expected in the request.
      Overrides:
      addRequestContentLength in class Progress
    • getRequestBytesTransferred

      public long getRequestBytesTransferred()
      Returns the number of bytes that have been transferred in the request.
      Overrides:
      getRequestBytesTransferred in class Progress
    • getResponseContentLength

      public long getResponseContentLength()
      Returns the number of bytes to be expected in the response, or -1 if the number is unknown (e.g. when the client hasn't received the response yet).
      Overrides:
      getResponseContentLength in class Progress
    • addResponseContentLength

      public void addResponseContentLength(long contentLength)
      Adds the number of bytes to be expected in the response.
      Overrides:
      addResponseContentLength in class Progress
    • getResponseBytesTransferred

      public long getResponseBytesTransferred()
      Returns the number of bytes that have been transferred in the response.
      Overrides:
      getResponseBytesTransferred in class Progress
    • addRequestBytesTransferred

      public void addRequestBytesTransferred(long bytes)
      Overrides:
      addRequestBytesTransferred in class Progress
      Parameters:
      bytes - can be negative if it was a reset event.
    • addResponseBytesTransferred

      public void addResponseBytesTransferred(long bytes)
      Overrides:
      addResponseBytesTransferred in class Progress
      Parameters:
      bytes - can be negative if it was a reset event.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isEnabled

      public final boolean isEnabled()
      Description copied from class: Progress
      Returns true if progress tracking is enabled; false otherwise.
      Overrides:
      isEnabled in class Progress