tigase.jaxmpp.core.client.xmpp.modules.chat
Class Chat

java.lang.Object
  extended by tigase.jaxmpp.core.client.xmpp.modules.chat.Chat

public class Chat
extends Object

Representation chat with specified interlocutor.


Field Summary
static EventType MessageReceived
           
 
Constructor Summary
Chat(long id, PacketWriter packetWriter, SessionObject sessionObject)
          Creates new chat representation object.
 
Method Summary
 long getId()
          Return internal identifier of chat object.
 JID getJid()
          Returns interlocutor JID.
 SessionObject getSessionObject()
          Return SessionObject related to this chat.
 String getThreadId()
          Returns thread-id.
 void sendMessage(String body)
          Sends message in current chat.
 void setJid(JID jid)
          Sets interlocutor JID.
 void setThreadId(String threadId)
          Sets thread-id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MessageReceived

public static final EventType MessageReceived
Constructor Detail

Chat

public Chat(long id,
            PacketWriter packetWriter,
            SessionObject sessionObject)
Creates new chat representation object.

Parameters:
id - internal object identifier.
packetWriter - packet writer related to chat.
sessionObject - session object related to chat.
Method Detail

getId

public long getId()
Return internal identifier of chat object.


getJid

public JID getJid()
Returns interlocutor JID.

Returns:
interlocutor JID.

getSessionObject

public SessionObject getSessionObject()
Return SessionObject related to this chat.

Returns:
SessionObject related to this chat.

getThreadId

public String getThreadId()
Returns thread-id.

Returns:
thread-id or null if not present.

sendMessage

public void sendMessage(String body)
                 throws XMLException,
                        JaxmppException
Sends message in current chat. It uses correct interlocutor JID and thread-id.

Parameters:
body - message to send.
Throws:
XMLException
JaxmppException

setJid

public void setJid(JID jid)
Sets interlocutor JID.

Parameters:
jid - interlocutor JID.

setThreadId

public void setThreadId(String threadId)
Sets thread-id.

Parameters:
threadId - thread-id.


Copyright © 2006-2013 Tigase. All Rights Reserved.