Package com.iland.core.web.sdk.util
Class Utils
java.lang.Object
com.iland.core.web.sdk.util.Utils
ApiUtils.
- Author:
- Brett Snyder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidperformAfterSync(Client client, com.iland.core.web.rest.response.task.TaskResponse task, Callback callback) Wait for a synced test and then run the given callback function.static com.iland.core.web.rest.response.task.TaskResponsewaitForSyncedTask(Client client, com.iland.core.web.rest.response.task.TaskResponse task) Wait for a synced task.static com.iland.core.web.rest.response.task.TaskResponsewaitForSyncedTask(Client client, com.iland.core.web.rest.response.task.TaskResponse task, long timeout, long sleep) Wait on a task to be synchronized.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
waitForSyncedTask
public static com.iland.core.web.rest.response.task.TaskResponse waitForSyncedTask(Client client, com.iland.core.web.rest.response.task.TaskResponse task, long timeout, long sleep) throws TimeoutException Wait on a task to be synchronized.- Parameters:
client-Clientapi clienttask-TaskResponsecore tasktimeout- milliseconds before timing out waiting on task to syncsleep- milliseconds to sleep between checking task status- Returns:
TaskResponsesynced core task- Throws:
TimeoutException
-
waitForSyncedTask
public static com.iland.core.web.rest.response.task.TaskResponse waitForSyncedTask(Client client, com.iland.core.web.rest.response.task.TaskResponse task) throws TimeoutException Wait for a synced task.Uses 1 second between queries to API for task status.
- Parameters:
client-Clientclienttask-TaskResponsetask- Returns:
TaskResponsesynced core task- Throws:
TimeoutException
-
performAfterSync
public static void performAfterSync(Client client, com.iland.core.web.rest.response.task.TaskResponse task, Callback callback) throws Exception Wait for a synced test and then run the given callback function.
-