Package com.ning.http.client.resumable
Class PropertiesBasedResumableProcessor
java.lang.Object
com.ning.http.client.resumable.PropertiesBasedResumableProcessor
- All Implemented Interfaces:
ResumableAsyncHandler.ResumableProcessor
public class PropertiesBasedResumableProcessor
extends Object
implements ResumableAsyncHandler.ResumableProcessor
A
ResumableAsyncHandler.ResumableProcessor which use a properties file
to store the download index information.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionload()Load theMapin memory, contains information about the transferred bytes.voidAssociate a key with the number of bytes sucessfully transferred.voidRemove the key associate value.voidSave the currentMapinstance which contains information about the current transfer state.
-
Constructor Details
-
PropertiesBasedResumableProcessor
public PropertiesBasedResumableProcessor()
-
-
Method Details
-
put
Description copied from interface:ResumableAsyncHandler.ResumableProcessorAssociate a key with the number of bytes sucessfully transferred.- Specified by:
putin interfaceResumableAsyncHandler.ResumableProcessor- Parameters:
url- a key. The recommended way is to use an url.transferredBytes- The number of bytes sucessfully transferred.
-
remove
Description copied from interface:ResumableAsyncHandler.ResumableProcessorRemove the key associate value.- Specified by:
removein interfaceResumableAsyncHandler.ResumableProcessor- Parameters:
uri- key from which the value will be discarted
-
save
Description copied from interface:ResumableAsyncHandler.ResumableProcessorSave the currentMapinstance which contains information about the current transfer state. This method *only* invoked when the JVM is shutting down.- Specified by:
savein interfaceResumableAsyncHandler.ResumableProcessor
-
load
Description copied from interface:ResumableAsyncHandler.ResumableProcessorLoad theMapin memory, contains information about the transferred bytes.- Specified by:
loadin interfaceResumableAsyncHandler.ResumableProcessor- Returns:
Map
-