Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
synchronized JID | getJID () |
synchronized Set< JID > | getParticipants () |
synchronized String | getThreadID () |
void | sendMessage (Message message) throws XMPPException |
void | sendMessage (String text) throws XMPPException |
synchronized void | setCurrentState (ChatState newState) throws XMPPException |
boolean | disconnect () |
synchronized boolean | isConnected () |
Package Functions | |
SingleUserChat () | |
synchronized void | initChat (String userJID, Chat chat, ChatStateManager chatStateManager) |
synchronized MessageListener | getMessageListener () |
void | setConnected (boolean isConnected) |
This object represents a chat with a single user.
de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.SingleUserChat | ( | ) | [package] |
boolean de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.disconnect | ( | ) |
This method does nothing as SingleUserChats are stateless despite the global connection status.
true
Implements de.fu_berlin.inf.dpp.communication.chat.IChat.
synchronized JID de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.getJID | ( | ) |
Returns the JID of the local user.
Implements de.fu_berlin.inf.dpp.communication.chat.IChat.
synchronized MessageListener de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.getMessageListener | ( | ) | [package] |
Returns the chat's MessageListener.
synchronized Set<JID> de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.getParticipants | ( | ) |
Returns the names of the user the chat is with.
Implements de.fu_berlin.inf.dpp.communication.chat.IChat.
synchronized String de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.getThreadID | ( | ) |
Returns the thread id associated with this chat, which corresponds to the thread field of XMPP messages.
Implements de.fu_berlin.inf.dpp.communication.chat.IChat.
synchronized void de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.initChat | ( | String | userJID, |
Chat | chat, | ||
ChatStateManager | chatStateManager | ||
) | [package] |
Initializes the chat so that it is possible to exchange messages with the participant.
userJID | JID of the local user |
chat | Chat object from Smack, contains the recipient |
chatStateManager | ChatStateManager of the current connection |
synchronized boolean de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.isConnected | ( | ) |
Returns if it is possible to post messages to the chat.
true
if it is possible to post messages, otherwise false
Implements de.fu_berlin.inf.dpp.communication.chat.IChat.
void de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.sendMessage | ( | String | text | ) | throws XMPPException |
Sends the specified text as a message to the other chat participants.
text | the specified text as a message to the other chat participant. |
XMPPException |
Implements de.fu_berlin.inf.dpp.communication.chat.IChat.
void de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.sendMessage | ( | Message | message | ) | throws XMPPException |
Sends a message to the other chat participants.
message | the message to send |
XMPPException |
Implements de.fu_berlin.inf.dpp.communication.chat.IChat.
void de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.setConnected | ( | boolean | isConnected | ) | [package] |
Notify the chat that it has been connected or disconnected which causes it to notify listeners and add ChatElements to its ChatHistory representing the event.
isConnected |
synchronized void de.fu_berlin.inf.dpp.communication.chat.single.SingleUserChat.setCurrentState | ( | ChatState | newState | ) | throws XMPPException |
Set this chat's ChatState and notify participants of the change.
newState | ChatState to set |
XMPPException |
Implements de.fu_berlin.inf.dpp.communication.chat.IChat.