Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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

public class MessageDeliveredEvent
extends EventObject

MessageDeliveredEvents confirm successful delivery of an instant message.

Author:
Emil Ivov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MessageDeliveredEvent(Message source, Contact to)
          Constructor.
MessageDeliveredEvent(Message source, Contact to, long timestamp)
          Creates a MessageDeliveredEvent representing delivery of the source message to the specified to contact.
 
Method Summary
 Contact getDestinationContact()
          Returns a reference to the Contact that Message was sent to.
 Message getSourceMessage()
          Returns the message 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
 

Constructor Detail

MessageDeliveredEvent

public MessageDeliveredEvent(Message source,
                             Contact to)
Constructor.

Parameters:
source - message source
to - the "to" contact

MessageDeliveredEvent

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

Parameters:
source - the Message whose delivery this event represents.
to - the Contact that this message was sent to.
timestamp - a date indicating the exact moment when the event ocurred
Method Detail

getDestinationContact

public Contact getDestinationContact()
Returns a reference to the Contact that Message was sent to.

Returns:
a reference to the Contact that has send the Message whose reception this event represents.

getSourceMessage

public Message getSourceMessage()
Returns the message that triggered this event

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.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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