public class Chat extends Object
| Modifier and Type | Field and Description |
|---|---|
static EventType |
MessageReceived |
| Constructor and Description |
|---|
Chat(long id,
PacketWriter packetWriter,
SessionObject sessionObject)
Creates new chat representation object.
|
| Modifier and Type | Method and Description |
|---|---|
ChatState |
getChatState() |
long |
getId()
Return internal identifier of chat object.
|
JID |
getJid()
Returns interlocutor JID.
|
protected ChatState |
getLocalChatState() |
SessionObject |
getSessionObject()
Return SessionObject related to this chat.
|
String |
getThreadId()
Returns thread-id.
|
boolean |
isMessageDeliveryReceiptsEnabled() |
Message |
sendMessage(String body)
Sends message in current chat.
|
protected void |
setChatState(ChatState state) |
void |
setJid(JID jid)
Sets interlocutor JID.
|
void |
setLocalChatState(ChatState state) |
void |
setMessageDeliveryReceiptsEnabled(boolean messageDeliveryReceiptsEnabled) |
void |
setThreadId(String threadId)
Sets thread-id.
|
public static final EventType MessageReceived
public Chat(long id,
PacketWriter packetWriter,
SessionObject sessionObject)
id - internal object identifier.packetWriter - packet writer related to chat.sessionObject - session object related to chat.public ChatState getChatState()
public long getId()
public JID getJid()
protected ChatState getLocalChatState()
public SessionObject getSessionObject()
public String getThreadId()
null if not present.public boolean isMessageDeliveryReceiptsEnabled()
public Message sendMessage(String body) throws XMLException, JaxmppException
body - message to send.XMLExceptionJaxmppExceptionprotected void setChatState(ChatState state)
public void setJid(JID jid)
jid - interlocutor JID.public void setLocalChatState(ChatState state) throws XMLException, JaxmppException
XMLExceptionJaxmppExceptionpublic void setMessageDeliveryReceiptsEnabled(boolean messageDeliveryReceiptsEnabled)
messageDeliveryReceiptsEnabled - the messageDeliveryReceiptsEnabled to setpublic void setThreadId(String threadId)
threadId - thread-id.Copyright © 2006–2014 Tigase. All rights reserved.