Class KiiRTransferManager
- java.lang.Object
-
- com.kii.cloud.storage.resumabletransfer.KiiRTransferManager
-
- All Implemented Interfaces:
KiiDownloadRTransferManager<KiiRTransferManagerCallback,KiiRTransferManager>
,KiiUploadRTransferManager<KiiRTransferManagerCallback,KiiRTransferManager>
public abstract class KiiRTransferManager extends java.lang.Object implements KiiUploadRTransferManager<KiiRTransferManagerCallback,KiiRTransferManager>, KiiDownloadRTransferManager<KiiRTransferManagerCallback,KiiRTransferManager>
Manages status of transfer.
-
-
Constructor Summary
Constructors Constructor Description KiiRTransferManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract KiiBaseBucket
getBucket()
Get the bucket of this manager belongs.abstract java.util.List<KiiDownloader>
listDownloadEntries(android.content.Context context, KiiUser user)
Download entries are stored with identifier of KiiUser who execute the download.abstract void
listDownloadEntries(android.content.Context context, KiiUser user, KiiRTransferManagerCallback callback)
Asynchronous call oflistDownloadEntries(Context, KiiUser)
NOTE: This method should be executed in UI thread.abstract java.util.List<KiiUploader>
listUploadEntries(android.content.Context context, KiiUser user)
Upload entries are stored with identifier of KiiUser who execute the upload.abstract void
listUploadEntries(android.content.Context context, KiiUser user, KiiRTransferManagerCallback callback)
Asynchronous call oflistUploadEntries(Context, KiiUser)
NOTE: This method should be executed in UI thread.-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.kii.cloud.storage.resumabletransfer.KiiDownloadRTransferManager
listDownloadEntries, listDownloadEntries
-
Methods inherited from interface com.kii.cloud.storage.resumabletransfer.KiiUploadRTransferManager
listUploadEntries, listUploadEntries
-
-
-
-
Method Detail
-
getBucket
@NonNull public abstract KiiBaseBucket getBucket()
Get the bucket of this manager belongs.- Returns:
- Bucket instance bound to this manager.
-
listUploadEntries
@NonNull public abstract java.util.List<KiiUploader> listUploadEntries(@NonNull android.content.Context context, @Nullable KiiUser user) throws StateStoreAccessException
Upload entries are stored with identifier of KiiUser who execute the upload. This API lists existing upload entries initiated by specified user. If specified user is null, it will list upload entries initiated by anonymous user.
By default anonymous user can not upload object body unless configure object ACL explicitly. Refer toKiiACL
about the details of ACL.
Entry Life cycle: The entry will be created on callingKiiUploader.transfer(KiiRTransferProgressCallback)
and deleted on completion/termination of upload. For details please refer toKiiUploader
NOTE: This api access to internal file storage stores status of upload . Should not be executed in UI/Main thread.- Parameters:
context
- application context.user
- KiiUser.- Returns:
- List of KiiUploader instance.
- Throws:
StateStoreAccessException
- Thrown when failed to access the persistent storage stores transfer status. (ex. Disk full, etc.)
You can retry safely.java.lang.IllegalArgumentException
- Thrown if context is null.
-
listUploadEntries
public abstract void listUploadEntries(@NonNull android.content.Context context, @Nullable KiiUser user, @NonNull KiiRTransferManagerCallback callback)
Asynchronous call oflistUploadEntries(Context, KiiUser)
NOTE: This method should be executed in UI thread.- Parameters:
context
- application context.KiiUser
- user.callback
- called when completed.- Throws:
java.lang.IllegalArgumentException
- Thrown if context or callback is null.- See Also:
KiiUploadRTransferManager.listUploadEntries(Context)
,KiiRTransferManagerCallback
-
listDownloadEntries
@NonNull public abstract java.util.List<KiiDownloader> listDownloadEntries(@NonNull android.content.Context context, @Nullable KiiUser user) throws StateStoreAccessException
Download entries are stored with identifier of KiiUser who execute the download. This API lists existing download entries initiated by specified user. If specified user is null, it will list download entries initiated by anonymous user.
Entry Life cycle: The entry will be created on callingKiiDownloader.transfer(KiiRTransferProgressCallback)
and deleted on completion/termination of download. For details please refer toKiiDownloader
NOTE: This api access to internal file storage stores status of download. Should not be executed in UI/Main thread.- Parameters:
context
- application context.user
- KiiUser.- Returns:
- List of KiiDownloader instance.
- Throws:
StateStoreAccessException
- Thrown when failed to access the persistent storage stores transfer status. (ex. Disk full, etc.)
You can retry safely.java.lang.IllegalArgumentException
- Thrown if context is null.
-
listDownloadEntries
public abstract void listDownloadEntries(@NonNull android.content.Context context, @Nullable KiiUser user, @NonNull KiiRTransferManagerCallback callback)
Asynchronous call oflistDownloadEntries(Context, KiiUser)
NOTE: This method should be executed in UI thread.- Parameters:
context
- application context.callback
- called when completed.- Throws:
java.lang.IllegalArgumentException
- Thrown if context or callback is null.- See Also:
KiiDownloadRTransferManager.listDownloadEntries(Context)
,KiiRTransferManagerCallback
-
-