Class BeforeAfterFutureTask<ValueT>

java.lang.Object
  extended by java.util.concurrent.FutureTask<ValueT>
      extended by BeforeAfterFutureTask<ValueT>
Type Parameters:
ValueT - the result type returned by get().
All Implemented Interfaces:
Runnable, Future<ValueT>

public class BeforeAfterFutureTask<ValueT>
extends FutureTask<ValueT>

Returned by BeforeAfterCaller.submit().


Method Summary
 Throwable getAfterThrowable()
          Throwable that occured in after().
 Throwable getBeforeThrowable()
          Throwable that occured in before() after BeforeAfterCallable.AllowCallToProceed.proceed() was called.
 BeforeAfterCallable<ValueT> getTask()
          Returns the BeforeAfterCallable associated with this.
 
Methods inherited from class java.util.concurrent.FutureTask
cancel, done, get, get, isCancelled, isDone, run, runAndReset, set, setException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTask

public BeforeAfterCallable<ValueT> getTask()
Returns the BeforeAfterCallable associated with this.

Returns:
BeforeAfterCallable

getBeforeThrowable

public Throwable getBeforeThrowable()
Throwable that occured in before() after BeforeAfterCallable.AllowCallToProceed.proceed() was called. It is a programming error if this is ever non-null

Returns:
Throwable

getAfterThrowable

public Throwable getAfterThrowable()
Throwable that occured in after().

Returns:
Throwable