Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.event
Class AdHocChatRoomMessageDeliveredEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.service.protocol.event.AdHocChatRoomMessageDeliveredEvent
All Implemented Interfaces:
Serializable

public class AdHocChatRoomMessageDeliveredEvent
extends EventObject

MessageDeliveredEvents confirm successful delivery of an instant message. Here, it's applied to an AdHocChatRoom.

Author:
Valentin Martinet
See Also:
Serialized Form

Field Summary
static int ACTION_MESSAGE_DELIVERED
          An event type indicating that the message being received is a special message that sent by either another participant or the server itself, indicating that some kind of action (other than the delivery of a conversation message) has occurred.
static int CONVERSATION_MESSAGE_DELIVERED
          An event type indicating that the message being received is a standard conversation message sent by another participant of the ad-hoc chat room to all current participants.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AdHocChatRoomMessageDeliveredEvent(AdHocChatRoom source, long timestamp, Message message, int eventType)
          Creates a MessageDeliveredEvent representing delivery of the source message to the specified to contact.
 
Method Summary
 int getEventType()
          Returns the type of message event represented by this event instance.
 Message getMessage()
          Returns the received message.
 AdHocChatRoom getSourceAdHocChatRoom()
          Returns the AdHocChatRoom that triggered this event.
 long getTimestamp()
          A timestamp indicating the exact date when the event occurred.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONVERSATION_MESSAGE_DELIVERED

public static final int CONVERSATION_MESSAGE_DELIVERED
An event type indicating that the message being received is a standard conversation message sent by another participant of the ad-hoc chat room to all current participants.

See Also:
Constant Field Values

ACTION_MESSAGE_DELIVERED

public static final int ACTION_MESSAGE_DELIVERED
An event type indicating that the message being received is a special message that sent by either another participant or the server itself, indicating that some kind of action (other than the delivery of a conversation message) has occurred. Action messages are widely used in IRC through the /action and /me commands

See Also:
Constant Field Values
Constructor Detail

AdHocChatRoomMessageDeliveredEvent

public AdHocChatRoomMessageDeliveredEvent(AdHocChatRoom source,
                                          long timestamp,
                                          Message message,
                                          int eventType)
Creates a MessageDeliveredEvent representing delivery of the source message to the specified to contact.

Parameters:
source - the AdHocChatRoom which triggered this event.
timestamp - a date indicating the exact moment when the event occurred
message - the message that triggered this event.
eventType - indicating the type of the delivered event. It's either an ACTION_MESSAGE_DELIVERED or a CONVERSATION_MESSAGE_DELIVERED.
Method Detail

getMessage

public Message getMessage()
Returns the received message.

Returns:
the Message that triggered this event.

getTimestamp

public long getTimestamp()
A timestamp indicating the exact date when the event occurred.

Returns:
a Date indicating when the event occurred.

getSourceAdHocChatRoom

public AdHocChatRoom getSourceAdHocChatRoom()
Returns the AdHocChatRoom that triggered this event.

Returns:
the AdHocChatRoom that triggered this event.

getEventType

public int getEventType()
Returns the type of message event represented by this event instance. Message event type is one of the XXX_MESSAGE_DELIVERED fields of this class.

Returns:
one of the XXX_MESSAGE_DELIVERED fields of this class indicating the type of this event.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.