Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Types | |
enum | ChatElementType { MESSAGE, JOIN, LEAVE, MESSAGERECEPTION, STATECHANGE } |
Public Member Functions | |
ChatElement (JID jid, Date date, ChatElementType type) | |
ChatElement (String message, JID jid, Date date) | |
ChatElement (Message message, Date date) | |
ChatElement (JID jid, Date date, ChatState state) | |
JID | getSender () |
Date | getDate () |
Message | getMessage () |
ChatElementType | getChatElementType () |
ChatState | getChatState () |
String | toString () |
Chat element class representing entries in the ChatHistory.
Represents the type of a chat element. For ChatElements, those types change their textual representation.
MESSAGE |
Used to represent a chat message. |
JOIN |
Used to represent a 'user joined'-notification. |
LEAVE |
Used to represent a 'user left'-notification. |
MESSAGERECEPTION |
Used to represent a confirmation for received messages. |
STATECHANGE |
Used to represent a change of the ChatState. |
de.fu_berlin.inf.dpp.communication.chat.ChatElement.ChatElement | ( | JID | jid, |
Date | date, | ||
ChatElementType | type | ||
) |
Create a chat element with the given chat element type. The message will be empty. This can be for example leave- and join-notifications.
jid | JID of the user to whom the element refers to, e.g. which user joined or left |
date | date of the occurrence, e.g. the joining or leaving |
type | type of the new chat element |
de.fu_berlin.inf.dpp.communication.chat.ChatElement.ChatElement | ( | String | message, |
JID | jid, | ||
Date | date | ||
) |
Construct a chat element with the given message body. The type of this element will be ChatElementType#MESSAGE.
message | message body of the chat element |
jid | sender of the message |
date | date the message has been received |
de.fu_berlin.inf.dpp.communication.chat.ChatElement.ChatElement | ( | Message | message, |
Date | date | ||
) |
Construct a chat element that represents a normal chat message. The type of this element will be ChatElementType#MESSAGE.
message | The message from which the body and the sender will be extracted |
date | date the message has been received |
de.fu_berlin.inf.dpp.communication.chat.ChatElement.ChatElement | ( | JID | jid, |
Date | date, | ||
ChatState | state | ||
) |
Construct a chat element that represents a chat state change (type ChatElementType#STATECHANGE). The message will be empty.
jid | JID of the user whose chat state has changed |
date | date of the chat state change |
state | new chat state |
ChatElementType de.fu_berlin.inf.dpp.communication.chat.ChatElement.getChatElementType | ( | ) |
Returns the ChatElementType.
ChatState de.fu_berlin.inf.dpp.communication.chat.ChatElement.getChatState | ( | ) |
Date de.fu_berlin.inf.dpp.communication.chat.ChatElement.getDate | ( | ) |
Returns the date the entry has been created.
Message de.fu_berlin.inf.dpp.communication.chat.ChatElement.getMessage | ( | ) |
Returns a Message with the ChatElements JID and message body. The body will be null
if there is no body to display.
JID de.fu_berlin.inf.dpp.communication.chat.ChatElement.getSender | ( | ) |
Returns the sender/causer of the entry.
String de.fu_berlin.inf.dpp.communication.chat.ChatElement.toString | ( | ) |
Return typical representation of chat element.