diff --git a/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageListener.java b/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageListener.java new file mode 100644 index 000000000..4d1b8448c --- /dev/null +++ b/src/net/java/sip/communicator/service/protocol/event/ChatRoomMessageListener.java @@ -0,0 +1,45 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.service.protocol.event; + +import java.util.*; + + +/** + * A listener that registers for ChatRoomMessageEvents issued by a + * particular ChatRoom. + * + * @author Emil Ivov + */ +public interface ChatRoomMessageListener + extends EventListener +{ + /** + * Called when a new incoming Message has been received. + * @param evt the ChatRoomMessageReceivedEvent containing the newly + * received message, its sender and other details. + */ + public void messageReceived(ChatRoomMessageReceivedEvent evt); + + /** + * Called when the underlying implementation has received an indication + * that a message, sent earlier has been successfully received by the + * destination. + * @param evt the ChatRoomMessageDeliveredEvent containing the id + * of the message that has caused the event. + */ + public void messageDelivered(ChatRoomMessageDeliveredEvent evt); + + /** + * Called to indicate that delivery of a message sent earlier to the chat + * room has failed. Reason code and phrase are contained by the + * MessageFailedEvent + * @param evt the ChatroomMessageDeliveryFailedEvent containing + * the ID of the message whose delivery has failed. + */ + public void messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt); +}