Interface ResultHandler<T,​E extends Exception>


  • public interface ResultHandler<T,​E extends Exception>
    ResultHandler is responsible for providing a mechanism of allowing access to the result of an asynchronous operation. In particular, this interface is generic to allow it to handle the particular return types of the potentially synchronous operations of the CTS. This ResultHandler is intended to only handle a single result. Therefore a new instance should be created for each request.
    • Method Detail

      • getResults

        T getResults()
              throws E extends Exception
        Get the results from the ResultHandler.
        Returns:
        A possibly null, result of type T.
        Throws:
        E - If processing the task caused an error, then this error will be thrown. Also thrown if the caller is blocked for too long waiting for this task.
        E extends Exception
      • processResults

        void processResults​(T result)
        Parameters:
        result - The result to store in this ResultHandler.
      • processError

        void processError​(Exception error)
        Parameters:
        error - The error to store in this result handler.