|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.adapters.MulticastResponse
This class defines a MulticastResponse
Constructor Summary | |
MulticastResponse(java.util.ArrayList recipient,
int waitMode)
Creates a new MulticastResponse object |
Method Summary | |
void |
addResult(Member m,
java.io.Serializable result)
Add the given result for the specified member. |
java.util.ArrayList |
getFailedMembers()
Returns the list of failed Members. |
java.util.ArrayList |
getRecipient()
Returns the original list of the recipients (the ones we sent the message to). |
java.io.Serializable |
getResult(Member m)
Get the result returned by the specified member. |
java.util.HashMap |
getResults()
Returns the member results (for all Members that succeeded). |
java.util.ArrayList |
getSucceedMembers()
Returns the list of members who sucessfully returned a response. |
void |
setFailedMembers(java.util.ArrayList failedMembers)
Sets the list of failed Members. |
void |
waitForCompletion(long timeout)
Wait until the needed number of responses has been received (according to the waiting mode policy). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MulticastResponse(java.util.ArrayList recipient, int waitMode)
MulticastResponse
object
recipient
- ArrayList
of Member
to which
the request is sentwaitMode
- one of MulticastRequestAdapter.WAIT_NONE, WAIT_FIRST,
WAIT_MAJORITY or WAIT_ALLMethod Detail |
public java.util.ArrayList getFailedMembers()
public void setFailedMembers(java.util.ArrayList failedMembers)
failedMembers
- The failed Members to set.public java.util.HashMap getResults()
public java.io.Serializable getResult(Member m)
m
- the member for which we need the result
public void addResult(Member m, java.io.Serializable result)
The member is then added in the succeedMembers list and the waitForCompletion() method might be unblocked according to the waiting mode policy specified in the constructor.
m
- member sending this resultresult
- result to add.public java.util.ArrayList getSucceedMembers()
addResult(Member, Serializable)
public java.util.ArrayList getRecipient()
ArrayList
of Member
.public void waitForCompletion(long timeout) throws TimeoutException
timeout
- maximum time in ms to wait for (0 means no timeout)
TimeoutException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |