Class Utils

java.lang.Object
com.iland.core.web.sdk.util.Utils

public class Utils extends Object
ApiUtils.
Author:
Brett Snyder
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    performAfterSync(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.TaskResponse
    waitForSyncedTask(Client client, com.iland.core.web.rest.response.task.TaskResponse task)
    Wait for a synced task.
    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)
    Wait on a task to be synchronized.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 - Client api client
      task - TaskResponse core task
      timeout - milliseconds before timing out waiting on task to sync
      sleep - milliseconds to sleep between checking task status
      Returns:
      TaskResponse synced 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 - Client client
      task - TaskResponse task
      Returns:
      TaskResponse synced 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.
      Parameters:
      client - Client client
      task - TaskResponse task
      callback - Callback callback function to run upon task sync
      Throws:
      Exception