nl.west.aaa
Class ReplyHandler

java.lang.Object
  |
  +--nl.west.aaa.ReplyHandler

public class ReplyHandler
extends java.lang.Object
implements MessageHandler


Constructor Summary
ReplyHandler()
           
 
Method Summary
 boolean handleMessage(Message msg, AAAUnit unit)
          If the message is a reply to a registered waiter, the waiter is woken up and true is returned.
 void prepareForReply(Message msg)
          Prepare this message for receiving a reply.
 Message waitForReply(Message msg, long timeout)
          Wait for a reply to the message to come in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplyHandler

public ReplyHandler()
Method Detail

prepareForReply

public void prepareForReply(Message msg)
Prepare this message for receiving a reply. This should be done before sending the message because the reply micht come in before it is waited upon.

waitForReply

public Message waitForReply(Message msg,
                            long timeout)
Wait for a reply to the message to come in. This method blocks until a reply is handled.

handleMessage

public boolean handleMessage(Message msg,
                             AAAUnit unit)
If the message is a reply to a registered waiter, the waiter is woken up and true is returned.
Specified by:
handleMessage in interface MessageHandler



Arthur <arthur@ch.twi.tudelft.nl> http://ch.twi.tudelft.nl/~arthur/
2002-05-27