Package jadex.commons.future
Interface ITuple2Future<E,F>
- 
- All Superinterfaces:
- IFuture<java.util.Collection<TupleResult>>,- IIntermediateFuture<TupleResult>
 - All Known Implementing Classes:
- Tuple2Future
 
 public interface ITuple2Future<E,F> extends IIntermediateFuture<TupleResult> A tuple future has a defined number of results of possibly different types. The future is considered as finished when all tuple elements have been set.
- 
- 
Field Summary- 
Fields inherited from interface jadex.commons.future.IIntermediateFutureDONE
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddTuple2ResultListener(IFunctionalResultListener<E> firstListener, IFunctionalResultListener<F> secondListener)Uses two functional result listeners to create a Tuple2ResultListener and add it.voidaddTuple2ResultListener(IFunctionalResultListener<E> firstListener, IFunctionalResultListener<F> secondListener, IFunctionalExceptionListener exceptionListener)Uses two functional result listeners to create a Tuple2ResultListener and add it.EgetFirstResult()Get the first result.EgetFirstResult(long timeout)Get the first result.EgetFirstResult(long timeout, boolean realtime)Get the first result.EgetFirstResult(ThreadSuspendable sus)Deprecated.- From 3.0.FgetSecondResult()Get the second result.FgetSecondResult(long timeout)Get the second result.FgetSecondResult(long timeout, boolean realtime)Get the second result.- 
Methods inherited from interface jadex.commons.future.IFutureacceptEither, addResultListener, addResultListener, addResultListener, applyToEither, delegate, exceptionally, exceptionally, exceptionally, get, get, get, get, get, getException, isDone, thenAccept, thenAccept, thenApply, thenApply, thenCombine, thenCompose, thenCompose
 - 
Methods inherited from interface jadex.commons.future.IIntermediateFutureaddIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, flatMapAsync, getIntermediateResults, getNextIntermediateResult, getNextIntermediateResult, hasNextIntermediateResult, hasNextIntermediateResult, mapAsync, mapAsync
 
- 
 
- 
- 
- 
Method Detail- 
getFirstResultE getFirstResult(ThreadSuspendable sus) Deprecated.- From 3.0. Use method without suspendable. Get the first result.- Returns:
- The next intermediate result.
 
 - 
getFirstResultE getFirstResult() Get the first result.- Returns:
- The next intermediate result.
 
 - 
getSecondResultF getSecondResult() Get the second result.- Returns:
- The next intermediate result.
 
 - 
getFirstResultE getFirstResult(long timeout) Get the first result.- Parameters:
- timeout- The timeout in millis.
- Returns:
- The next intermediate result.
 
 - 
getSecondResultF getSecondResult(long timeout) Get the second result.- Parameters:
- timeout- The timeout in millis.
- Returns:
- The next intermediate result.
 
 - 
getFirstResultE getFirstResult(long timeout, boolean realtime) Get the first result.- Parameters:
- timeout- The timeout in millis.
- realtime- Flag if wait should be realtime (in contrast to simulation time).
- Returns:
- The next intermediate result.
 
 - 
getSecondResultF getSecondResult(long timeout, boolean realtime) Get the second result.- Parameters:
- timeout- The timeout in millis.
- realtime- Flag if wait should be realtime (in contrast to simulation time).
- Returns:
- The next intermediate result.
 
 - 
addTuple2ResultListenervoid addTuple2ResultListener(IFunctionalResultListener<E> firstListener, IFunctionalResultListener<F> secondListener) Uses two functional result listeners to create a Tuple2ResultListener and add it. The first listener is called upon reception of the first result, the second is called for the second result. Exceptions will be logged to console.- Parameters:
- firstListener- Listener for the first available result.
- secondListener- Listener for the second available result.
 
 - 
addTuple2ResultListenervoid addTuple2ResultListener(IFunctionalResultListener<E> firstListener, IFunctionalResultListener<F> secondListener, IFunctionalExceptionListener exceptionListener) Uses two functional result listeners to create a Tuple2ResultListener and add it. The first listener is called upon reception of the first result, the second is called for the second result. Additionally, a given exception listener is called when exceptions occur.- Parameters:
- firstListener- Listener for the first available result.
- secondListener- Listener for the second available result.
- exListener- The listener that is called on exceptions. Passing- nullenables default exception logging.
 
 
- 
 
-