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
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.
-
Field Summary
Fields inherited from interface jadex.future.IIntermediateFuture
DONE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addQuietListener
(IResultListener<Collection<E>> listener) Add a listener which does not consume the initial results.Get the intermediate results that are available.Methods inherited from interface jadex.future.IBackwardCommandFuture
sendBackwardCommand
Methods inherited from interface jadex.future.IFuture
addResultListener, catchEx, catchEx, catchEx, delegate, delegateTo, get, get, get, get, get, getException, isDone, printOnEx, then, thenApply, thenApply, thenCompose, thenCompose
Methods inherited from interface jadex.future.IIntermediateFuture
asStream, asStream, done, finished, getNextIntermediateResult, getNextIntermediateResult, hasNextIntermediateResult, hasNextIntermediateResult, max, next
Methods inherited from interface jadex.future.ITerminableFuture
terminate, terminate
-
Method Details
-
addQuietListener
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 interfaceIIntermediateFuture<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().
-