Source code: MessageHandler.java

index |  24 lines | javadoc ]

package nl.west.aaa;


/**
 * Interface to handle incoming Messages.
 * Implementations of this interface can be registered
 * with a AAAUnit to handle incoming messages
 * that are not replies to sent messages.
 * @see AAAUnit#addMessageHandler(MessageHandler)
 */
public interface MessageHandler
{

    /**
     * Process the incoming message. Return false if message
     * cannot be processed in the current context.
     * If the message is processed and handled by
     * this class, return true.
     * <br>
     * The given AAAUnit can be used to send replies.
     */
    public boolean handleMessage(Message msg,AAAUnit unit);

}


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