Class FlattenMultiplexCollector
- java.lang.Object
- 
- jadex.bridge.service.component.multiinvoke.FlattenMultiplexCollector
 
- 
- All Implemented Interfaces:
- IMultiplexCollector,- IFunctionalExceptionListener,- IFunctionalIntermediateFinishedListener<java.lang.Object>,- IFunctionalIntermediateResultCountListener,- IFunctionalIntermediateResultListener<java.lang.Object>,- IFunctionalResultListener<java.util.Collection<java.lang.Object>>,- IIntermediateResultListener<java.lang.Object>,- IResultListener<java.util.Collection<java.lang.Object>>
 
 public class FlattenMultiplexCollector extends java.lang.Object implements IMultiplexCollector 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.List<java.lang.Object>callresultsThe list of results (if ret is not intermediate future).protected java.util.List<Future<java.lang.Void>>callsThe list of calls.protected booleanflattenFlag if flatten.protected Future<java.lang.Object>futThe future.
 - 
Constructor SummaryConstructors Constructor Description FlattenMultiplexCollector()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddResult(java.lang.Object result)Add a result.voidexceptionOccurred(java.lang.Exception exception)Called when an exception occurred.voidfinished()Declare that the future is finished.voidinit(Future<java.lang.Object> fut, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.reflect.Method muxmethod)Init to share code.voidintermediateResultAvailable(java.lang.Object result)Called when an intermediate result is available.voidmaxResultCountAvailable(int max)Declare that the future result count is available.voidresultAvailable(java.util.Collection<java.lang.Object> result)Called when the result is available.protected voidsetException(java.lang.Exception exception)Set an exception.protected voidsetFinished()Set finished.
 
- 
- 
- 
Field Detail- 
futprotected Future<java.lang.Object> fut The future.
 - 
flattenprotected boolean flatten Flag if flatten.
 - 
callsprotected java.util.List<Future<java.lang.Void>> calls The list of calls.
 - 
callresultsprotected java.util.List<java.lang.Object> callresults The list of results (if ret is not intermediate future).
 
- 
 - 
Method Detail- 
initpublic void init(Future<java.lang.Object> fut, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.reflect.Method muxmethod) Init to share code.- Specified by:
- initin interface- IMultiplexCollector
 
 - 
intermediateResultAvailablepublic void intermediateResultAvailable(java.lang.Object result) Description copied from interface:IIntermediateResultListenerCalled when an intermediate result is available.- Specified by:
- intermediateResultAvailablein interface- IFunctionalIntermediateResultListener<java.lang.Object>
- Specified by:
- intermediateResultAvailablein interface- IIntermediateResultListener<java.lang.Object>
- Parameters:
- result- The result.
 
 - 
finishedpublic void finished() Description copied from interface:IIntermediateResultListenerDeclare that the future is finished. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method was called for all intermediate results before.- Specified by:
- finishedin interface- IFunctionalIntermediateFinishedListener<java.lang.Object>
- Specified by:
- finishedin interface- IIntermediateResultListener<java.lang.Object>
 
 - 
maxResultCountAvailablepublic void maxResultCountAvailable(int max) Description copied from interface:IIntermediateResultListenerDeclare that the future result count is available. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method will be called as often as the result count indicates except an exception occurs.- Specified by:
- maxResultCountAvailablein interface- IFunctionalIntermediateResultCountListener
- Specified by:
- maxResultCountAvailablein interface- IIntermediateResultListener<java.lang.Object>
 
 - 
resultAvailablepublic void resultAvailable(java.util.Collection<java.lang.Object> result) Description copied from interface:IFunctionalResultListenerCalled when the result is available.- Specified by:
- resultAvailablein interface- IFunctionalResultListener<java.util.Collection<java.lang.Object>>
- Parameters:
- result- The result.
 
 - 
exceptionOccurredpublic void exceptionOccurred(java.lang.Exception exception) Description copied from interface:IFunctionalExceptionListenerCalled when an exception occurred.- Specified by:
- exceptionOccurredin interface- IFunctionalExceptionListener
- Parameters:
- exception- The exception.
 
 - 
addResultprotected void addResult(java.lang.Object result) Add a result.- Parameters:
- result- The result.
 
 - 
setFinishedprotected void setFinished() Set finished.
 - 
setExceptionprotected void setException(java.lang.Exception exception) Set an exception.- Parameters:
- exception- The exception.
 
 
- 
 
-