Package jadex.future
Class PullSubscriptionIntermediateFuture<E>
java.lang.Object
jadex.future.Future<Collection<E>>
jadex.future.IntermediateFuture<E>
jadex.future.TerminableIntermediateFuture<E>
jadex.future.SubscriptionIntermediateFuture<E>
jadex.future.PullSubscriptionIntermediateFuture<E>
- All Implemented Interfaces:
IBackwardCommandFuture
,IForwardCommandFuture
,IFuture<Collection<E>>
,IIntermediateFuture<E>
,IPullIntermediateFuture<E>
,IPullSubscriptionIntermediateFuture<E>
,ISubscriptionIntermediateFuture<E>
,ITerminableFuture<Collection<E>>
,ITerminableIntermediateFuture<E>
,Supplier<Collection<E>>
public class PullSubscriptionIntermediateFuture<E>
extends SubscriptionIntermediateFuture<E>
implements IPullSubscriptionIntermediateFuture<E>, IPullIntermediateFuture<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.future.IForwardCommandFuture
IForwardCommandFuture.Type
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.common.ICommand
<PullSubscriptionIntermediateFuture<E>> The pull command.Fields inherited from class jadex.future.SubscriptionIntermediateFuture
ownresults, resultssize, storeforfirst
Fields inherited from class jadex.future.TerminableIntermediateFuture
bcommands, terminate
Fields inherited from class jadex.future.IntermediateFuture
icallers, indices, intermediate, maxresultcnt, notcommand, results
Fields inherited from class jadex.future.Future
CALLER_QUEUED, CALLER_RESUMED, CALLER_SUSPENDED, callers, creation, DEBUG, exception, first, listeners, NO_STACK_COMPACTION, NONE, NOTIFICATIONS, notificount, notified, result, resultavailable, undone, UNSET
Fields inherited from interface jadex.future.IIntermediateFuture
DONE
-
Constructor Summary
ConstructorsConstructorDescriptionPullSubscriptionIntermediateFuture
(jadex.common.ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd) Create a new future.PullSubscriptionIntermediateFuture
(jadex.common.ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd, ITerminationCommand termcom) Create a new future.PullSubscriptionIntermediateFuture
(Exception exception) Create a future that is already done (failed). -
Method Summary
Methods inherited from class jadex.future.SubscriptionIntermediateFuture
addQuietListener, addResultListener, catchEx, catchEx, doGetNextIntermediateResult, finished, getIntermediateResults, getNextIntermediateResult, getResultCount, hasNextIntermediateResult, max, storeResult
Methods inherited from class jadex.future.TerminableIntermediateFuture
addBackwardCommand, getTerminationCommand, removeBackwardCommand, sendBackwardCommand, setTerminationCommand, terminate, terminate
Methods inherited from class jadex.future.IntermediateFuture
addIntermediateResult, addIntermediateResultIfUndone, asStream, asStream, delegateEx, delegateFrom, doAddIntermediateResult, done, doSetException, doSetFinished, doSetResult, getNextIntermediateResult, getNextIntermediateResult, getNotificationCommand, hasNextIntermediateResult, next, notifyIntermediateResult, resume, resumeIntermediate, scheduleMaxNotification, setFinished, setFinishedIfUndone, setMaxResultCount, then
Methods inherited from class jadex.future.Future
abortGet, catchEx, delegate, delegateTo, doAddResultListener, doStartScheduledNotifications, executeNotification, get, get, get, get, get, getEmptyFuture, getException, getFuture, hasResultListener, isDone, isNotified, printOnEx, scheduleNotification, scheduleNotification, sendForwardCommand, setException, setExceptionIfUndone, setResult, setResultIfUndone, startScheduledNotifications, thenAccept, thenAccept, thenApply, thenApply, thenCombine, thenCompose, thenCompose, throwException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.ISubscriptionIntermediateFuture
addQuietListener, getIntermediateResults
Methods inherited from interface jadex.future.ITerminableFuture
terminate, terminate
-
Field Details
-
pullcmd
The pull command.
-
-
Constructor Details
-
PullSubscriptionIntermediateFuture
Create a future that is already done (failed).- Parameters:
exception
- The exception.
-
PullSubscriptionIntermediateFuture
public PullSubscriptionIntermediateFuture(jadex.common.ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd) Create a new future.- Parameters:
pullcmd
- The pull command.
-
PullSubscriptionIntermediateFuture
public PullSubscriptionIntermediateFuture(jadex.common.ICommand<PullSubscriptionIntermediateFuture<E>> pullcmd, ITerminationCommand termcom) Create a new future.- Parameters:
pullcmd
- The pull command.termcom
- The runnable to be executed in case of termination.
-
-
Method Details
-
pullIntermediateResult
public void pullIntermediateResult()Pull an intermediate result.- Specified by:
pullIntermediateResult
in interfaceIPullIntermediateFuture<E>
- Specified by:
pullIntermediateResult
in interfaceIPullSubscriptionIntermediateFuture<E>
-