public class ChatRoomMessageReceivedEvent
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
static int |
ACTION_MESSAGE_RECEIVED
An event type indicating that the message being received is a special
message that sent by either another member or the server itself,
indicating that some kind of action (other than the delivery of a
conversation message) has occurred.
|
static int |
CONVERSATION_MESSAGE_RECEIVED
An event type indicating that the message being received is a standard
conversation message sent by another member of the chatroom to all
current participants.
|
static int |
SYSTEM_MESSAGE_RECEIVED
An event type indicting that the message being received is a system
message being sent by the server or a system administrator, possibly
notifying us of something important such as ongoing maintenance
activities or server downtime.
|
Constructor and Description |
---|
ChatRoomMessageReceivedEvent(ChatRoom source,
ChatRoomMember from,
java.util.Date timestamp,
Message message,
int eventType)
Creates a MessageReceivedEvent representing reception of the
source message received from the specified from
contact.
|
Modifier and Type | Method and Description |
---|---|
int |
getEventType()
Returns the type of message event represented by this event instance.
|
Message |
getMessage()
Returns the received message.
|
ChatRoom |
getSourceChatRoom()
Returns the ChatRoom that triggered this event.
|
ChatRoomMember |
getSourceChatRoomMember()
Returns a reference to the ChatRoomMember that has send the
Message whose reception this event represents.
|
java.util.Date |
getTimestamp()
A timestamp indicating the exact date when the event occurred.
|
boolean |
isHistoryMessage()
Is current event for history message.
|
boolean |
isImportantMessage()
Returns true if message is important and false if not.
|
void |
setHistoryMessage(boolean historyMessage)
Changes property, whether this event is for a history message.
|
void |
setImportantMessage(boolean isImportant)
Sets the the important message flag of the event.
|
public static final int CONVERSATION_MESSAGE_RECEIVED
public static final int ACTION_MESSAGE_RECEIVED
public static final int SYSTEM_MESSAGE_RECEIVED
public ChatRoomMessageReceivedEvent(ChatRoom source, ChatRoomMember from, java.util.Date timestamp, Message message, int eventType)
source
- the ChatRoom for which the message is received.from
- the ChatRoomMember that has sent this message.timestamp
- the exact date when the event occurred.message
- the received Message.eventType
- the type of message event that this instance represents
(one of the XXX_MESSAGE_RECEIVED static fields).public ChatRoomMember getSourceChatRoomMember()
public Message getMessage()
public java.util.Date getTimestamp()
public ChatRoom getSourceChatRoom()
public int getEventType()
public boolean isHistoryMessage()
public void setHistoryMessage(boolean historyMessage)
historyMessage
- whether its event for history message.public void setImportantMessage(boolean isImportant)
isImportant
- the value to be set.public boolean isImportantMessage()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.