Class CallableWithResult<T>

  • All Implemented Interfaces:
    Callable<T>

    public abstract class CallableWithResult<T>
    extends Object
    implements Callable<T>
    Callable that stores the result for future use.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_Result

        protected T m_Result
        the result.
    • Constructor Detail

      • CallableWithResult

        public CallableWithResult()
    • Method Detail

      • doCall

        protected abstract T doCall()
                             throws Exception
        Performs the actual code execution.
        Returns:
        the result
        Throws:
        Exception - if failed to execute
      • call

        public T call()
               throws Exception
        Executes the code.
        Specified by:
        call in interface Callable<T>
        Returns:
        the result
        Throws:
        Exception - if failed to execute
      • getResult

        public T getResult()
        Returns the result of the execution.
        Returns:
        the result