T - The result time when the action has completed.public class AsyncMonitor<T>
extends java.lang.Object
| Constructor and Description |
|---|
AsyncMonitor(IOneDriveClient client,
AsyncMonitorLocation monitorLocation,
ResultGetter<T> resultGetter)
Create a new async monitor.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getResult()
Gets the result from the service.
|
void |
getResult(ICallback<T> callback)
Gets the result from the service asynchronously.
|
AsyncOperationStatus |
getStatus()
Gets the status of the monitor from the service.
|
void |
getStatus(ICallback<AsyncOperationStatus> callback)
Gets the status of the monitor from the service asynchronously.
|
void |
pollForResult(long millisBetweenPoll,
IProgressCallback<T> callback)
Polls the service for the monitored operation to complete.
|
public AsyncMonitor(IOneDriveClient client, AsyncMonitorLocation monitorLocation, ResultGetter<T> resultGetter)
client - The client.monitorLocation - The monitor location.resultGetter - The way to retrieve the result.public void getStatus(ICallback<AsyncOperationStatus> callback)
callback - The callback.public AsyncOperationStatus getStatus() throws ClientException
ClientException - Exception occurs if there was a problem retrieving the status from the service.public void getResult(ICallback<T> callback)
callback - The callback.public T getResult() throws ClientException
ClientException - An exception occurs if there was an problem retrieving the status from the service.public void pollForResult(long millisBetweenPoll,
IProgressCallback<T> callback)
millisBetweenPoll - The milliseconds between polls.callback - The progress callback.