Package jadex.future

Interface ISubscriptionIntermediateFuture<E>

All Superinterfaces:
IBackwardCommandFuture, IFuture<Collection<E>>, IIntermediateFuture<E>, ITerminableFuture<Collection<E>>, ITerminableIntermediateFuture<E>, Supplier<Collection<E>>
All Known Subinterfaces:
IPullSubscriptionIntermediateFuture<E>
All Known Implementing Classes:
PullSubscriptionIntermediateDelegationFuture, PullSubscriptionIntermediateFuture, SubscriptionIntermediateDelegationFuture, SubscriptionIntermediateFuture

public interface ISubscriptionIntermediateFuture<E> extends ITerminableIntermediateFuture<E>
The subscription intermediate future does not save the results but instead uses a fire and forget semantics. A listener gets current intermediate results in intermediateResultAvailable(). In getIntermediateResults() null is returned unless blocking access is also used.
  • Method Details

    • addQuietListener

      void addQuietListener(IResultListener<Collection<E>> listener)
      Add a listener which does not consume the initial results. I.e. even if it is the first listener to be added to this future, a second listener will still receive the initial results.
    • getIntermediateResults

      Collection<E> getIntermediateResults()
      Get the intermediate results that are available. Note: The semantics of this method is different to the normal intermediate future due to the fire-and-forget-semantics!
      Specified by:
      getIntermediateResults in interface IIntermediateFuture<E>
      Returns:
      1) Non-blocking access only: An empty collection, unless if the future is in "store-for-first" mode (default) and no listeners has yet been added, in which case the results until now are returned.
      2) Also blocking access from same thread: All results since the first blocking access that have not yet been consumed by getNextIntermediateResult().