Class aglet.ReplySet
All Packages Class Hierarchy This Package Previous Next Index
Class aglet.ReplySet
java.lang.Object
|
+----aglet.ReplySet
- public final class ReplySet
- extends Object
ReplySetは到着したものから順に取り出すことのできるFutureReply
オブジェクトを収めるコンテナである.
ReplySet set = context.multicastMessage(new Message("multicast"));
set.addFutureReply( aglet.sendAsyncMessage(new Message("additional"));
int i = 0;
whlie(set.hasMoreFutureReply()) {
FutureReply future = set.getNextFutureReply();
Object reply = future.getReply();
System.out.println("No[" + i + "] = " + reply);
}
- See Also:
- multicastMessage, Message, FutureReply
-
ReplySet()
- ReplySetオブジェクトの生成
-
addFutureReply(FutureReply)
- FutureReplyオブジェクトを追加.
-
areAllAvailable()
- このReplySetの中のすべてのFutureReplyオブジェクトが返答を
受け取っているかを調べる.
-
countAvailable()
- ReplySetの中で到着している返答の数を返す.
-
countUnavailable()
- 返答を受け取っていないFutureReplyオブジェクトの数を返す.
-
done(FutureReply)
- agletプログラマには普通使われないもの..
-
getNextFutureReply()
- 次の返答が到着しているFutureReplyオブジェクトを返す.
-
hasMoreFutureReplies()
- このReplySetオブジェクトにまだFutureReplyオブジェクトが
残っているかを調べる.
-
isAnyAvailable()
- このReplySetオブジェクトの中に, 返答を受け取っている
FutureReplyオブジェクトがあるかを調べる.
-
waitForAllReplies()
- 全ての返答が到着するまで待つ.
-
waitForAllReplies(long)
- 全ての返答が到着するまで待つ.
-
waitForNextFutureReply()
- 次の返答が到着するまで待つ.
-
waitForNextFutureReply(long)
- 次の返答が到着するまで待つ.
ReplySet
public ReplySet()
- ReplySetオブジェクトの生成
hasMoreFutureReplies
public synchronized boolean hasMoreFutureReplies()
- このReplySetオブジェクトにまだFutureReplyオブジェクトが
残っているかを調べる.
- Returns:
- true FutureReplyオブジェクトがまだ残っていればtrue
isAnyAvailable
public boolean isAnyAvailable()
- このReplySetオブジェクトの中に, 返答を受け取っている
FutureReplyオブジェクトがあるかを調べる.
- Returns:
- true 返答を受け取っているFutureReplyがある場合にtrue
areAllAvailable
public boolean areAllAvailable()
- このReplySetの中のすべてのFutureReplyオブジェクトが返答を
受け取っているかを調べる.
- Returns:
- true すべてのFutureReplyオブジェクトが返答を受け取っている場合にtrue
countAvailable
public int countAvailable()
- ReplySetの中で到着している返答の数を返す.
- Returns:
- 到着ずみの返答の数.
countUnavailable
public int countUnavailable()
- 返答を受け取っていないFutureReplyオブジェクトの数を返す.
- Returns:
- 返答が到着していないFutreReplyオブジェクトの数.
waitForNextFutureReply
public synchronized void waitForNextFutureReply()
- 次の返答が到着するまで待つ.
waitForNextFutureReply
public synchronized void waitForNextFutureReply(long timeout)
- 次の返答が到着するまで待つ.
- Parameters:
- timeout - 最大待ち時間(ミリ秒単位)
waitForAllReplies
public synchronized void waitForAllReplies()
- 全ての返答が到着するまで待つ.
waitForAllReplies
public synchronized void waitForAllReplies(long timeout)
- 全ての返答が到着するまで待つ.
- Parameters:
- timeout - 最大待ち時間(ミリ秒単位)
getNextFutureReply
public synchronized FutureReply getNextFutureReply()
- 次の返答が到着しているFutureReplyオブジェクトを返す.
- Returns:
- 返答が到着しているFutureReplyオブジェクト
addFutureReply
public synchronized void addFutureReply(FutureReply reply)
- FutureReplyオブジェクトを追加.
- Parameters:
- reply - 追加するFutureReplyオブジェクト
done
public synchronized void done(FutureReply reply)
- agletプログラマには普通使われないもの..
All Packages Class Hierarchy This Package Previous Next Index