Package org.sblim.slp.internal.ua
Class ResultTable
java.lang.Object
org.sblim.slp.internal.ua.ResultTable
- All Implemented Interfaces:
java.util.Iterator<java.lang.Object>
public class ResultTable
extends java.lang.Object
implements java.util.Iterator<java.lang.Object>
ResultTable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addException
(java.lang.Exception pE) addExceptionvoid
addExceptions
(java.util.Iterator<?> pExceptionItr) addExceptionsvoid
addExceptions
(ReplyMessage pReplyMsg) addExceptionsvoid
addResults
(java.util.Iterator<?> pResItr) addResultsvoid
addResults
(ReplyMessage pReplyMsg) addResultsint
getTotalResponsesboolean
boolean
hasNext()
java.lang.Object
next()
java.lang.Object
void
ResultTable has to know which Requesters provide results.void
remove()
void
If the Requester's sequence is completed, Requester has to be unregistered otherwise hasNext() will block.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ResultTable
public ResultTable()
-
-
Method Details
-
registerRequester
ResultTable has to know which Requesters provide results. Requester have to be registered before hasNext() is called.- Parameters:
pReq
-- See Also:
-
unregisterRequester
If the Requester's sequence is completed, Requester has to be unregistered otherwise hasNext() will block.- Parameters:
pReq
-
-
addResults
addResults- Parameters:
pReplyMsg
-
-
addResults
public void addResults(java.util.Iterator<?> pResItr) addResults- Parameters:
pResItr
-
-
addExceptions
addExceptions- Parameters:
pReplyMsg
-
-
addExceptions
public void addExceptions(java.util.Iterator<?> pExceptionItr) addExceptions- Parameters:
pExceptionItr
-
-
addException
public void addException(java.lang.Exception pE) addException- Parameters:
pE
-
-
getTotalResponses
public int getTotalResponses()getTotalResponses- Returns:
- int
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfacejava.util.Iterator<java.lang.Object>
- Returns:
- true if there are results or exceptions to read
- See Also:
-
Iterator.hasNext()
-
next
public java.lang.Object next() throws java.util.NoSuchElementException- Specified by:
next
in interfacejava.util.Iterator<java.lang.Object>
- Returns:
- a result or an Exception
- Throws:
java.util.NoSuchElementException
- See Also:
-
Iterator.next()
-
nextException
public java.lang.Object nextException() throws java.util.NoSuchElementException- Returns:
- next element in Exception table
- Throws:
java.util.NoSuchElementException
-
hasMoreExceptions
public boolean hasMoreExceptions()- Returns:
- next element in Exception table
-
remove
public void remove()- Specified by:
remove
in interfacejava.util.Iterator<java.lang.Object>
-