Package com.kii.cloud.storage.callback
Class KiiObjectCallBack
- java.lang.Object
-
- com.kii.cloud.storage.callback.KiiObjectCallBack
-
- All Implemented Interfaces:
KiiObjectBodyCallback
,KiiObjectPublishCallback
public abstract class KiiObjectCallBack extends java.lang.Object implements KiiObjectBodyCallback, KiiObjectPublishCallback
Defines the call back interfaces forKiiObject
.
-
-
Constructor Summary
Constructors Constructor Description KiiObjectCallBack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onDeleteBodyCompleted(int token, KiiObject object, java.lang.Exception exception)
Runs on the UI thread after theKiiObject.deleteBody(KiiObjectCallBack)
has been executed.void
onDeleteCompleted(int token, java.lang.Exception exception)
Runs on the UI thread after theKiiObject.delete(KiiObjectCallBack)
has been executed.void
onPublishCompleted(java.lang.String url, KiiObject object, java.lang.Exception exception)
Runs on the UI thread after theKiiObject#publish(KiiObjectPublishCallback)
,KiiObject.publishBodyExpiresAt(long, KiiObjectPublishCallback)
orKiiObject.publishBodyExpiresIn(int, KiiObjectPublishCallback)
has been executed.void
onRefreshCompleted(int token, KiiObject object, java.lang.Exception exception)
Runs on the UI thread after theKiiObject.refresh(KiiObjectCallBack)
has been executed.void
onSaveCompleted(int token, KiiObject object, java.lang.Exception exception)
Runs on the UI thread after theKiiObject.save(KiiObjectCallBack)
has been executed.void
onTaskCancel(int token)
Runs on the UI thread after the task has been canceled.void
onTaskStart(int token)
Runs on the UI thread before the task is executed.void
onTransferCompleted(KiiObject object, java.lang.Exception exception)
Executed on the UI thread when the transfer has completed.void
onTransferProgress(KiiObject object, long completedInBytes, long totalSizeinBytes)
Executed on the UI thread when transfer progress has updated.void
onTransferStart(KiiObject object)
Executed on the UI thread when transfer is started.
-
-
-
Method Detail
-
onTaskCancel
public void onTaskCancel(int token)
Runs on the UI thread after the task has been canceled.
-
onTaskStart
public void onTaskStart(int token)
Runs on the UI thread before the task is executed.
-
onSaveCompleted
public void onSaveCompleted(int token, @NonNull KiiObject object, @Nullable java.lang.Exception exception)
Runs on the UI thread after theKiiObject.save(KiiObjectCallBack)
has been executed.
-
onRefreshCompleted
public void onRefreshCompleted(int token, @NonNull KiiObject object, @Nullable java.lang.Exception exception)
Runs on the UI thread after theKiiObject.refresh(KiiObjectCallBack)
has been executed.
-
onDeleteCompleted
public void onDeleteCompleted(int token, @Nullable java.lang.Exception exception)
Runs on the UI thread after theKiiObject.delete(KiiObjectCallBack)
has been executed.
-
onPublishCompleted
public void onPublishCompleted(@Nullable java.lang.String url, @NonNull KiiObject object, @Nullable java.lang.Exception exception)
Runs on the UI thread after theKiiObject#publish(KiiObjectPublishCallback)
,KiiObject.publishBodyExpiresAt(long, KiiObjectPublishCallback)
orKiiObject.publishBodyExpiresIn(int, KiiObjectPublishCallback)
has been executed. URL will be null if the publication fails.- Specified by:
onPublishCompleted
in interfaceKiiObjectPublishCallback
-
onTransferStart
public void onTransferStart(@NonNull KiiObject object)
Executed on the UI thread when transfer is started.- Specified by:
onTransferStart
in interfaceKiiObjectBodyCallback
- Parameters:
object
- KiiObject instance which has invoked transfer operation.
-
onTransferCompleted
public void onTransferCompleted(@NonNull KiiObject object, @Nullable java.lang.Exception exception)
Executed on the UI thread when the transfer has completed.- Specified by:
onTransferCompleted
in interfaceKiiObjectBodyCallback
- Parameters:
object
- KiiObject instance which has invoked transfer operation.exception
- null if completed otherwise failed.
-
onTransferProgress
public void onTransferProgress(@NonNull KiiObject object, long completedInBytes, long totalSizeinBytes)
Executed on the UI thread when transfer progress has updated.- Specified by:
onTransferProgress
in interfaceKiiObjectBodyCallback
- Parameters:
operator
- KiiObject instance which has invoked transfer operation.completedInBytes
- Completed size of transfer in bytes.totalSizeinBytes
- Total size of transfer in bytes.
-
onDeleteBodyCompleted
public void onDeleteBodyCompleted(int token, @NonNull KiiObject object, @Nullable java.lang.Exception exception)
Runs on the UI thread after theKiiObject.deleteBody(KiiObjectCallBack)
has been executed.
-
-