com.zerjio.JIRC
Interface ReplyMsgListener

All Known Implementing Classes:
SimpleReplyMsgListener

public interface ReplyMsgListener

The basic interface for a ReplyMessage listener.


Method Summary
 boolean listensTo(java.lang.String replyCode)
          Should return true if it listens to the particular reply code and false otherwise.
 void replyMsgReceived(ReplyMessage msg)
          This method should take care about a ReplyMessage that has been recieved.
 

Method Detail

replyMsgReceived

public void replyMsgReceived(ReplyMessage msg)
This method should take care about a ReplyMessage that has been recieved.

It should mark the message as used using IRCMessage.markAsUsed() in case that the information on the message has been used in any form. It is also responsible of using IRCMessage.mustBeDiscarded() if no other listener should get noticed about this message.

Please note that the listener will only receive the reply messages indicated by listenTo(String replyCode).

Parameters:
msg - The ReplyMessage that has been received.
See Also:
markAsUsed, mustBeDiscarded, listenTo(String replyCode)

listensTo

public boolean listensTo(java.lang.String replyCode)
Should return true if it listens to the particular reply code and false otherwise. If it always returns true it will listen to any reply message. If it always returns false it will not listen to any reply message.

Parameters:
replyCode - The reply code that must be tested.
Returns:
true if the replyCode is being listened. false if the replyCode is not being listened.