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

## Class Chat

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

-     public class Chat
      extends Object

  Representation chat with specified interlocutor.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Chat(long id, Context context)` Creates new chat representation object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Message` | `createMessage(String body)` Sends message in current chat.
    `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` | `setJid(JID jid)` Sets interlocutor JID.
    `void` | `setMessageModule(MessageModule module)`
    `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`

- - ### Constructor Detail

    - #### Chat

          public Chat(long id,
                      Context context)

      Creates new chat representation object.
      Parameters:
        `id` - internal object identifier.
        `packetWriter` - packet writer related to chat.
        `sessionObject` - session object related to chat.

  - ### Method Detail

    - #### createMessage

          public Message createMessage(String body)
                                throws JaxmppException

      Sends message in current chat. It uses correct interlocutor JID and thread-id.
      Parameters:
        `body` - message to send.
      Returns:
      Throws:
        `JaxmppException`

    - #### getId

          public long getId()

      Return internal identifier of chat object.

    - #### getJid

          public JID getJid()

      Returns interlocutor JID.
      Returns:
        interlocutor JID.

    - #### setJid

          public void setJid(JID jid)

      Sets interlocutor JID.
      Parameters:
        `jid` - 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.

    - #### setThreadId

          public void setThreadId(String threadId)

      Sets thread-id.
      Parameters:
        `threadId` - thread-id.

    - #### setMessageModule

          public void setMessageModule(MessageModule module)

Copyright © 2006–2019 Tigase. All rights reserved.