public class MessageReceivedEvent
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
static int |
CONVERSATION_MESSAGE_RECEIVED
An event type indicating that the message being received is a standard
conversation message sent by another contact.
|
static int |
SMS_MESSAGE_RECEIVED
an event type indicating that the message being received is an SMS
message.
|
static int |
SYSTEM_MESSAGE_RECEIVED
An event type indicating that the message being received is a system
message being sent by the server or a system administrator.
|
Constructor and Description |
---|
MessageReceivedEvent(Message source,
Contact from,
ContactResource fromResource,
java.util.Date timestamp,
int eventType)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
contact.
|
MessageReceivedEvent(Message source,
Contact from,
ContactResource fromResource,
java.util.Date timestamp,
int eventType,
boolean isPrivateMessaging,
ChatRoom privateContactRoom)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
contact.
|
MessageReceivedEvent(Message source,
Contact from,
ContactResource fromResource,
java.util.Date timestamp,
java.lang.String correctedMessageUID)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
contact.
|
MessageReceivedEvent(Message source,
Contact from,
ContactResource fromResource,
java.util.Date timestamp,
java.lang.String correctedMessageUID,
boolean isPrivateMessaging,
ChatRoom privateContactRoom)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
contact.
|
MessageReceivedEvent(Message source,
Contact from,
java.util.Date timestamp)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
contact.
|
MessageReceivedEvent(Message source,
Contact from,
java.util.Date timestamp,
int eventType)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
contact.
|
MessageReceivedEvent(Message source,
Contact from,
java.util.Date timestamp,
java.lang.String correctedMessageUID)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
contact.
|
MessageReceivedEvent(Message source,
Contact from,
java.lang.String correctedMessageUID)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
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 correctedMessageUID The ID of the message being corrected,
or null if this is a new message and not a correction.
|
int |
getEventType()
Returns the type of message event represented by this event instance.
|
ChatRoom |
getPrivateMessagingContactRoom()
Returns the chat room of the private messaging contact associated with
the event and null if the contact is not private messaging contact.
|
Contact |
getSourceContact()
Returns a reference to the Contact that has sent the
Message whose reception this event represents.
|
Message |
getSourceMessage()
Returns the message that triggered this event
|
java.util.Date |
getTimestamp()
A timestamp indicating the exact date when the event occurred.
|
boolean |
isPrivateMessaging()
Returns true if this is private messaging event and
false if not.
|
public static final int CONVERSATION_MESSAGE_RECEIVED
public static final int SYSTEM_MESSAGE_RECEIVED
public static final int SMS_MESSAGE_RECEIVED
public MessageReceivedEvent(Message source, Contact from, java.util.Date timestamp)
source
- the Message whose reception this event represents.from
- the Contact that has sent this message.timestamp
- the exact date when the event ocurred.public MessageReceivedEvent(Message source, Contact from, java.lang.String correctedMessageUID)
source
- the Message whose reception this event represents.from
- the Contact that has sent this message.correctedMessageUID
- The ID of the message being corrected, or null
if this is a new message
and not a correction.public MessageReceivedEvent(Message source, Contact from, java.util.Date timestamp, java.lang.String correctedMessageUID)
source
- the Message whose reception this event represents.from
- the Contact that has sent this message.timestamp
- the exact date when the event occurred.correctedMessageUID
- The ID of the message being corrected, or null
if this is a new message
and not a correction.public MessageReceivedEvent(Message source, Contact from, ContactResource fromResource, java.util.Date timestamp, java.lang.String correctedMessageUID)
source
- the Message whose reception this event represents.from
- the Contact that has sent this message.fromResource
- the ContactResource, from which this message
was senttimestamp
- the exact date when the event occurred.correctedMessageUID
- The ID of the message being corrected, or null
if this is a new message
and not a correction.public MessageReceivedEvent(Message source, Contact from, ContactResource fromResource, java.util.Date timestamp, java.lang.String correctedMessageUID, boolean isPrivateMessaging, ChatRoom privateContactRoom)
source
- the Message whose reception this event represents.from
- the Contact that has sent this message.fromResource
- the ContactResource, from which this message
was senttimestamp
- the exact date when the event occurred.correctedMessageUID
- The ID of the message being corrected, or null
if this is a new message and not a correction.isPrivateMessaging
- indicates whether the this is private messaging
event or not.privateContactRoom
- the chat room associated with the contact.public MessageReceivedEvent(Message source, Contact from, java.util.Date timestamp, int eventType)
source
- the Message whose reception this event represents.from
- the Contact that has sent this message.timestamp
- the exact date when the event occurred.eventType
- the type of message event that this instance represents
(one of the XXX_MESSAGE_RECEIVED static fields).public MessageReceivedEvent(Message source, Contact from, ContactResource fromResource, java.util.Date timestamp, int eventType)
source
- the Message whose reception this event represents.from
- the Contact that has sent this message.fromResource
- the ContactResource, from which this message
was senttimestamp
- the exact date when the event occurred.eventType
- the type of message event that this instance represents
(one of the XXX_MESSAGE_RECEIVED static fields).public MessageReceivedEvent(Message source, Contact from, ContactResource fromResource, java.util.Date timestamp, int eventType, boolean isPrivateMessaging, ChatRoom privateContactRoom)
source
- the Message whose reception this event represents.from
- the Contact that has sent this message.fromResource
- the ContactResource, from which this message
was senttimestamp
- the exact date when the event occurred.eventType
- the type of message event that this instance represents
(one of the XXX_MESSAGE_RECEIVED static fields).isPrivateMessaging
- indicates whether the this is private messaging
event or not.privateContactRoom
- the chat room associated with the contact.public Contact getSourceContact()
public ContactResource getContactResource()
public Message getSourceMessage()
public java.util.Date getTimestamp()
public int getEventType()
public java.lang.String getCorrectedMessageUID()
public ChatRoom getPrivateMessagingContactRoom()
public boolean isPrivateMessaging()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.