HOME

com.ireasoning.protocol
Interface Listener

All Superinterfaces:
EventListener

public interface Listener
extends EventListener

The Listener interface is the primary method for handling events. Users implement the Listener interface and register their listener on an Session using the addListener method. The users should also remove their Listener from its Session after they have completed using the listener.

See Also:
Session

Method Summary
 void handleMsg(Object msgSender, Msg msg)
          This method is called whenever receiving a message or an exception occurred.
 

Method Detail

handleMsg

public void handleMsg(Object msgSender,
                      Msg msg)
This method is called whenever receiving a message or an exception occurred.

Parameters:
msg - an instance of the received message, or an instance of ErrorMsg if an exception occurred. The fastest way is to use msg.getType() == Msg.ERROR_TYPE to check if it's a Errormsg.
msgSender - the reference of message sender

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.