Package jadex.future
Class PullIntermediateFuture<E>
java.lang.Object
jadex.future.Future<Collection<E>>
jadex.future.IntermediateFuture<E>
jadex.future.TerminableIntermediateFuture<E>
jadex.future.PullIntermediateFuture<E>
- All Implemented Interfaces:
IBackwardCommandFuture,IForwardCommandFuture,IFuture<Collection<E>>,IIntermediateFuture<E>,IPullIntermediateFuture<E>,ITerminableFuture<Collection<E>>,ITerminableIntermediateFuture<E>,Supplier<Collection<E>>
public class PullIntermediateFuture<E>
extends TerminableIntermediateFuture<E>
implements IPullIntermediateFuture<E>
Intermediate future with pull mechanism.
Allows for pulling results by the caller.
In this way a pull intermediate future is
similar to an iterator.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jadex.future.IForwardCommandFuture
IForwardCommandFuture.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.common.ICommand<PullIntermediateFuture<E>> The pull command.Fields inherited from class jadex.future.TerminableIntermediateFuture
bcommands, terminateFields inherited from class jadex.future.IntermediateFuture
icallers, indices, intermediate, maxresultcnt, notcommand, resultsFields 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, UNSETFields inherited from interface jadex.future.IIntermediateFuture
DONE -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new future.PullIntermediateFuture(jadex.common.ICommand<PullIntermediateFuture<E>> pullcmd) Create a new future.PullIntermediateFuture(jadex.common.ICommand<PullIntermediateFuture<E>> pullcmd, ITerminationCommand termcom) Create a new future.PullIntermediateFuture(Exception exception) Create a future that is already done (failed). -
Method Summary
Methods inherited from class jadex.future.TerminableIntermediateFuture
addBackwardCommand, getTerminationCommand, removeBackwardCommand, sendBackwardCommand, setTerminationCommand, terminate, terminateMethods inherited from class jadex.future.IntermediateFuture
addIntermediateResult, addIntermediateResultIfUndone, addResultListener, asStream, asStream, catchEx, delegateEx, delegateFrom, doAddIntermediateResult, doGetNextIntermediateResult, done, doSetException, doSetFinished, doSetResult, finished, getIntermediateResults, getNextIntermediateResult, getNextIntermediateResult, getNextIntermediateResult, getNotificationCommand, getResultCount, hasNextIntermediateResult, hasNextIntermediateResult, max, next, notifyIntermediateResult, resume, resumeIntermediate, scheduleMaxNotification, setFinished, setFinishedIfUndone, setMaxResultCount, storeResult, thenMethods inherited from class jadex.future.Future
abortGet, catchEx, 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, throwExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jadex.future.IBackwardCommandFuture
sendBackwardCommandMethods inherited from interface jadex.future.IFuture
addResultListener, catchEx, catchEx, catchEx, delegate, delegateTo, get, get, get, get, get, getException, isDone, printOnEx, then, thenApply, thenApply, thenCompose, thenComposeMethods inherited from interface jadex.future.IIntermediateFuture
asStream, asStream, done, finished, getIntermediateResults, getNextIntermediateResult, getNextIntermediateResult, hasNextIntermediateResult, hasNextIntermediateResult, max, nextMethods inherited from interface jadex.future.ITerminableFuture
terminate, terminate
-
Field Details
-
pullcmd
The pull command.
-
-
Constructor Details
-
PullIntermediateFuture
public PullIntermediateFuture()Create a new future. -
PullIntermediateFuture
Create a future that is already done (failed).- Parameters:
exception- The exception.
-
PullIntermediateFuture
Create a new future.- Parameters:
pullcmd- The pull command
-
PullIntermediateFuture
public PullIntermediateFuture(jadex.common.ICommand<PullIntermediateFuture<E>> pullcmd, ITerminationCommand termcom) Create a new future.- Parameters:
pullcmd- The pull commandtermcom- The runnable to be executed in case of termination.
-
-
Method Details
-
pullIntermediateResult
public void pullIntermediateResult()Pull an intermediate result.- Specified by:
pullIntermediateResultin interfaceIPullIntermediateFuture<E>
-