Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.aglet
Class ReplySet

    java.lang.Object
      |
      +--com.ibm.aglet.ReplySet

public final class ReplySet
extends java.lang.Object

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();
     System.out.println("No[" + i + "] = " + reply);
     }

Version:
  1.20 $Date: 2001/07/28 06:34:05 $
Author:
  Mitsuru Oshima
See Also:
  `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

### ReplySet

    public ReplySet()

  Constructs a ReplySet object.

Method Detail

### addFutureReply

    public void addFutureReply(FutureReply reply)

  Adds the FutureReplyd object to this ReplySet.
  Parameters:
    `reply` - the FutureReply to add.

### areAllAvailable

    public boolean areAllAvailable()

  Checks if all FutureReply objects in this ReplySet have received replies.
  Returns:
    true if all replies of FutureReply objects are available

### countAvailable

    public int countAvailable()

  Counts the number of available replies in this ReplySet.
  Returns:
    the number of available replise

### countUnavailable

    public int countUnavailable()

  Counts the number of FutureReply objects which have no reply available.
  Returns:
    the number of FutureReply which have no reply available.

### done

    public void done(FutureReply reply)

  Is is not normally used by the aglet programmers.

### getNextFutureReply

    public FutureReply getNextFutureReply()

  Gets the next FutureReply whose reply is available.
  Returns:
    a FutureReply object whose reply is available.

### hasMoreFutureReplies

    public boolean hasMoreFutureReplies()

  Checks if there are more FutureReply objects in this ReplySet object.
  Returns:
    true if there are FutureReply objects

### isAnyAvailable

    public boolean isAnyAvailable()

  Checks if there is any FutureReply object whose reply is available in this ReplySet object.
  Returns:
    true if there are FutureReply objects whose reply is available.

### waitForAllReplies

    public void waitForAllReplies()

  Waits until the all replies are available.

### waitForAllReplies

    public void waitForAllReplies(long timeout)

  Waits until the all replies are available
  Parameters:
    `timeout` - the maximum time to wait in milliseconds.

### waitForNextFutureReply

    public void waitForNextFutureReply()

  Waits until the next reply is available.

### waitForNextFutureReply

    public void waitForNextFutureReply(long timeout)

  Waits until the next reply is available.
  Parameters:
    `timeout` - the maximum time to wait in milliseconds.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD