Class GenericResultWaiter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
      static int SERVICE_FAILED
      Status code for a failed service
      static int SERVICE_FINISHED
      Status code for a successful service
      static int SERVICE_RUNNING
      Status code for a running service
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> getResult()
      Gets the results of the service or null if none
      java.lang.Throwable getThrowable()
      Returns the exception which was thrown or null if none
      boolean isCompleted()
      If the service has completed return true
      void receiveResult​(java.util.Map<java.lang.String,​java.lang.Object> result)
      Receive the result of an asynchronous service call
      void receiveThrowable​(java.lang.Throwable t)
      Receive an exception (Throwable) from an asynchronous service cell
      int status()
      Returns the status of the service.
      java.util.Map<java.lang.String,​java.lang.Object> waitForResult()
      Waits for the service to complete
      java.util.Map<java.lang.String,​java.lang.Object> waitForResult​(long milliseconds)
      Waits for the service to complete, check the status ever n milliseconds
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
      • SERVICE_RUNNING

        public static final int SERVICE_RUNNING
        Status code for a running service
        See Also:
        Constant Field Values
      • SERVICE_FAILED

        public static final int SERVICE_FAILED
        Status code for a failed service
        See Also:
        Constant Field Values
      • SERVICE_FINISHED

        public static final int SERVICE_FINISHED
        Status code for a successful service
        See Also:
        Constant Field Values
    • Constructor Detail

      • GenericResultWaiter

        public GenericResultWaiter()
    • Method Detail

      • status

        public int status()
        Returns the status of the service.
        Returns:
        int Status code
      • isCompleted

        public boolean isCompleted()
        If the service has completed return true
        Returns:
        boolean
      • getThrowable

        public java.lang.Throwable getThrowable()
        Returns the exception which was thrown or null if none
        Returns:
        Exception
      • getResult

        public java.util.Map<java.lang.String,​java.lang.Object> getResult()
        Gets the results of the service or null if none
        Returns:
        Map
      • waitForResult

        public java.util.Map<java.lang.String,​java.lang.Object> waitForResult()
        Waits for the service to complete
        Returns:
        Map
      • waitForResult

        public java.util.Map<java.lang.String,​java.lang.Object> waitForResult​(long milliseconds)
        Waits for the service to complete, check the status ever n milliseconds
        Parameters:
        milliseconds -
        Returns:
        Map