Package jadex.commons.future
Class PullSubscriptionIntermediateFuture<E>
- java.lang.Object
-
- jadex.commons.future.Future<java.util.Collection<E>>
-
- jadex.commons.future.IntermediateFuture<E>
-
- jadex.commons.future.TerminableIntermediateFuture<E>
-
- jadex.commons.future.SubscriptionIntermediateFuture<E>
-
- jadex.commons.future.PullSubscriptionIntermediateFuture<E>
-
- All Implemented Interfaces:
IBackwardCommandFuture
,IForwardCommandFuture
,IFuture<java.util.Collection<E>>
,IIntermediateFuture<E>
,IPullSubscriptionIntermediateFuture<E>
,ISubscriptionIntermediateFuture<E>
,ITerminableFuture<java.util.Collection<E>>
,ITerminableIntermediateFuture<E>
public class PullSubscriptionIntermediateFuture<E> extends SubscriptionIntermediateFuture<E> implements IPullSubscriptionIntermediateFuture<E>
Intermediate future that can be terminated from caller side. A termination request leads to setException() being called with a FutureTerminatedException. The future can be supplied with a command that gets executed if terminate is called.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jadex.commons.future.IForwardCommandFuture
IForwardCommandFuture.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected ICommand<PullSubscriptionIntermediateFuture<E>>
pullcmd
The pull command.-
Fields inherited from class jadex.commons.future.SubscriptionIntermediateFuture
ownresults, resultssize, storeforfirst
-
Fields inherited from class jadex.commons.future.TerminableIntermediateFuture
bcommands, terminate
-
Fields inherited from class jadex.commons.future.IntermediateFuture
icallers, indices, intermediate, maxresultcnt, notcommand, results
-
Fields inherited from class jadex.commons.future.Future
CALLER_QUEUED, CALLER_RESUMED, CALLER_SUSPENDED, callers, creation, DEBUG, exception, first, listeners, NO_STACK_COMPACTION, NONE, NOTIFICATIONS, notificount, result, resultavailable, undone, UNSET
-
Fields inherited from interface jadex.commons.future.IIntermediateFuture
DONE
-
-
Constructor Summary
Constructors Constructor Description PullSubscriptionIntermediateFuture(ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd)
Create a new future.PullSubscriptionIntermediateFuture(ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd, ITerminationCommand termcom)
Create a new future.PullSubscriptionIntermediateFuture(java.lang.Exception exception)
Create a future that is already done (failed).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
pullIntermediateResult()
Pull an intermediate result.-
Methods inherited from class jadex.commons.future.SubscriptionIntermediateFuture
addQuietListener, addResultListener, doGetNextIntermediateResult, getIntermediateResults, getNextIntermediateResult, getResultCount, hasNextIntermediateResult, setMaxResultCount, storeResult
-
Methods inherited from class jadex.commons.future.TerminableIntermediateFuture
addBackwardCommand, getTerminationCommand, removeBackwardCommand, sendBackwardCommand, setTerminationCommand, terminate, terminate
-
Methods inherited from class jadex.commons.future.IntermediateFuture
addIntermediateResult, addIntermediateResultIfUndone, addIntermediateResultListener, catchErr, doAddIntermediateResult, doSetException, doSetFinished, doSetResult, finished, flatMapAsync, getNextIntermediateResult, getNextIntermediateResult, getNotificationCommand, hasNextIntermediateResult, mapAsync, mapAsync, max, next, notifyIntermediateResult, resume, resumeIntermediate, scheduleMaxNotification, setFinished, setFinishedIfUndone
-
Methods inherited from class jadex.commons.future.Future
abortGet, catchErr, catchErr, delegate, doAddResultListener, doStartScheduledNotifications, executeNotification, get, get, get, get, get, getEmptyFuture, getException, getFuture, hasResultListener, isDone, scheduleNotification, scheduleNotification, sendForwardCommand, setException, setExceptionIfUndone, setResult, setResultIfUndone, startScheduledNotifications, then, thenAccept, thenAccept, thenApply, thenApply, thenCombine, thenCompose, thenCompose
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jadex.commons.future.IBackwardCommandFuture
sendBackwardCommand
-
Methods inherited from interface jadex.commons.future.IFuture
addResultListener, catchErr, catchErr, catchErr, delegate, get, get, get, get, get, getException, isDone, then, thenApply, thenApply, thenCompose, thenCompose
-
Methods inherited from interface jadex.commons.future.IIntermediateFuture
finished, flatMapAsync, getNextIntermediateResult, getNextIntermediateResult, hasNextIntermediateResult, hasNextIntermediateResult, mapAsync, mapAsync, max, next
-
Methods inherited from interface jadex.commons.future.ISubscriptionIntermediateFuture
addQuietListener, getIntermediateResults
-
Methods inherited from interface jadex.commons.future.ITerminableFuture
terminate, terminate
-
-
-
-
Field Detail
-
pullcmd
protected ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd
The pull command.
-
-
Constructor Detail
-
PullSubscriptionIntermediateFuture
public PullSubscriptionIntermediateFuture(java.lang.Exception exception)
Create a future that is already done (failed).- Parameters:
exception
- The exception.
-
PullSubscriptionIntermediateFuture
public PullSubscriptionIntermediateFuture(ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd)
Create a new future.- Parameters:
terminate
- The runnable to be executed in case of termination.
-
PullSubscriptionIntermediateFuture
public PullSubscriptionIntermediateFuture(ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd, ITerminationCommand termcom)
Create a new future.- Parameters:
terminate
- The runnable to be executed in case of termination.
-
-
Method Detail
-
pullIntermediateResult
public void pullIntermediateResult()
Pull an intermediate result.- Specified by:
pullIntermediateResult
in interfaceIPullSubscriptionIntermediateFuture<E>
-
-