Class ResumableAsyncHandler<T>

java.lang.Object
com.ning.http.client.resumable.ResumableAsyncHandler<T>
All Implemented Interfaces:
AsyncHandler<T>

public class ResumableAsyncHandler<T> extends Object implements AsyncHandler<T>
An AsyncHandler which support resumable download, e.g when used with an ResumableIOExceptionFilter, this handler can resume the download operation at the point it was before the interruption occured. This prevent having to download the entire file again. It's the responsibility of the TransferListener to track how many bytes has been transferred and to properly adjust the file's write position.

In case of a JVM crash/shutdown, you can create an instance of this class and pass the last valid bytes position.

  • Constructor Details

    • ResumableAsyncHandler

      public ResumableAsyncHandler(long byteTransferred)
    • ResumableAsyncHandler

      public ResumableAsyncHandler(boolean accumulateBody)
    • ResumableAsyncHandler

      public ResumableAsyncHandler()
    • ResumableAsyncHandler

      public ResumableAsyncHandler(AsyncHandler<T> decoratedAsyncHandler)
    • ResumableAsyncHandler

      public ResumableAsyncHandler(long byteTransferred, AsyncHandler<T> decoratedAsyncHandler)
    • ResumableAsyncHandler

      public ResumableAsyncHandler(ResumableAsyncHandler.ResumableProcessor resumableProcessor)
    • ResumableAsyncHandler

      public ResumableAsyncHandler(ResumableAsyncHandler.ResumableProcessor resumableProcessor, boolean accumulateBody)
  • Method Details