Package jadex.future

Interface ITerminableFuture<E>

All Superinterfaces:
IBackwardCommandFuture, IFuture<E>, Supplier<E>
All Known Subinterfaces:
IPullIntermediateFuture<E>, IPullSubscriptionIntermediateFuture<E>, ISubscriptionIntermediateFuture<E>, ITerminableIntermediateFuture<E>
All Known Implementing Classes:
PullIntermediateDelegationFuture, PullIntermediateFuture, PullSubscriptionIntermediateDelegationFuture, PullSubscriptionIntermediateFuture, SubscriptionIntermediateDelegationFuture, SubscriptionIntermediateFuture, TerminableDelegationFuture, TerminableFuture, TerminableIntermediateDelegationFuture, TerminableIntermediateFuture

public interface ITerminableFuture<E> extends IFuture<E>, IBackwardCommandFuture
Interface for a future that can be terminated from caller side. A termination request leads to setException() being called with a FutureTerminatedException.
  • Method Details

    • terminate

      void terminate()
      Terminate the future. The exception will be set to FutureTerminatedException.
    • terminate

      void terminate(Exception reason)
      Terminate the future and supply a custom reason.