public class MessageDeliveredEvent
extends java.util.EventObject
Constructor and Description |
---|
MessageDeliveredEvent(Message source,
Contact to)
Constructor.
|
MessageDeliveredEvent(Message source,
Contact to,
ContactResource toResource)
Creates a MessageDeliveredEvent representing delivery of the
source message to the specified to contact.
|
MessageDeliveredEvent(Message source,
Contact to,
ContactResource toResource,
java.util.Date timestamp)
Creates a MessageDeliveredEvent representing delivery of the
source message to the specified to contact.
|
MessageDeliveredEvent(Message source,
Contact to,
java.util.Date timestamp)
Creates a MessageDeliveredEvent representing delivery of the
source message to the specified to contact.
|
MessageDeliveredEvent(Message source,
Contact to,
java.lang.String correctedMessageUID)
Creates a MessageDeliveredEvent representing delivery of the
source message to the specified to contact.
|
Modifier and Type | Method and Description |
---|---|
ContactResource |
getContactResource()
Returns a reference to the ContactResource that has sent the
Message whose reception this event represents.
|
java.lang.String |
getCorrectedMessageUID()
Returns the ID of the message being corrected, or null if this was a
new message and not a message correction.
|
Contact |
getDestinationContact()
Returns a reference to the Contact that Message was
sent to.
|
Message |
getSourceMessage()
Returns the message that triggered this event
|
java.util.Date |
getTimestamp()
A timestamp indicating the exact date when the event occurred.
|
boolean |
isMessageEncrypted()
Returns true if the message is encrypted and false if
not.
|
boolean |
isSmsMessage()
Returns whether the delivered message is a sms one.
|
void |
setCorrectedMessageUID(java.lang.String correctedMessageUID)
Sets the ID of the message being corrected to the passed ID.
|
void |
setMessageEncrypted(boolean isMessageEncrypted)
Sets the message encrypted flag of the event.
|
void |
setSmsMessage(boolean smsMessage)
Sets whether the message is a sms one.
|
public MessageDeliveredEvent(Message source, Contact to)
source
- message sourceto
- the "to" contactpublic MessageDeliveredEvent(Message source, Contact to, java.lang.String correctedMessageUID)
source
- the Message whose delivery this event represents.to
- the Contact that this message was sent to.correctedMessageUID
- The ID of the message being corrected.public MessageDeliveredEvent(Message source, Contact to, java.util.Date timestamp)
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
ocurredpublic MessageDeliveredEvent(Message source, Contact to, ContactResource toResource, java.util.Date timestamp)
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
ocurredpublic MessageDeliveredEvent(Message source, Contact to, ContactResource toResource)
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
ocurredpublic Contact getDestinationContact()
public Message getSourceMessage()
public java.util.Date getTimestamp()
public java.lang.String getCorrectedMessageUID()
public void setCorrectedMessageUID(java.lang.String correctedMessageUID)
correctedMessageUID
- The ID of the message being corrected.public void setSmsMessage(boolean smsMessage)
smsMessage
- whether it is a sms one.public boolean isSmsMessage()
public ContactResource getContactResource()
public boolean isMessageEncrypted()
public void setMessageEncrypted(boolean isMessageEncrypted)
isMessageEncrypted
- the value to be set.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.