|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.aglet.ReplySet
ReplySet is a container of the FutureReply objects by which the each of FutureReply object can be retrieved as its reply become available.
ReplySet set = context.multicastMessage(new Message("multicast")); set.addFutureReply( aglet.sendAsyncMessage(new Message("additional")); int i = 0; whlie(set.hasMoreFutureReplies()) { FutureReply future = set.getNextFutureReply(); Object reply = future.getReply(); logCategory.debug("No[" + i + "] = " + reply); }
AgletContext.multicastMessage(com.ibm.aglet.Message)
,
Message
,
FutureReply
Constructor Summary | |
ReplySet()
Constructs a ReplySet object. |
Method Summary | |
void |
addFutureReply(FutureReply reply)
Adds the FutureReplyd object to this ReplySet. |
boolean |
areAllAvailable()
Checks if all FutureReply objects in this ReplySet have received replies. |
int |
countAvailable()
Counts the number of available replies in this ReplySet. |
int |
countUnavailable()
Counts the number of FutureReply objects which have no reply available. |
void |
done(FutureReply reply)
Is is not normally used by the aglet programmers. |
FutureReply |
getNextFutureReply()
Gets the next FutureReply whose reply is available. |
boolean |
hasMoreFutureReplies()
Checks if there are more FutureReply objects in this ReplySet object. |
boolean |
isAnyAvailable()
Checks if there is any FutureReply object whose reply is available in this ReplySet object. |
void |
waitForAllReplies()
Waits until the all replies are available. |
void |
waitForAllReplies(long timeout)
Waits until the all replies are available |
void |
waitForNextFutureReply()
Waits until the next reply is available. |
void |
waitForNextFutureReply(long timeout)
Waits until the next reply is available. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReplySet()
Method Detail |
public void addFutureReply(FutureReply reply)
reply
- the FutureReply to add.public boolean areAllAvailable()
public int countAvailable()
public int countUnavailable()
public void done(FutureReply reply)
public FutureReply getNextFutureReply()
public boolean hasMoreFutureReplies()
public boolean isAnyAvailable()
public void waitForAllReplies()
public void waitForAllReplies(long timeout)
timeout
- the maximum time to wait in milliseconds.public void waitForNextFutureReply()
public void waitForNextFutureReply(long timeout)
timeout
- the maximum time to wait in milliseconds.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |