public final class ChatService extends java.lang.Object implements java.lang.Comparable<ChatService>
A chat service hosts chat rooms. It allows you to discover public chat rooms or create new (instant) rooms, if allowed by the service.
You get an instance of this class by either using the MultiUserChatManager.createChatService(Jid)
method or by discovering the chat services at your connected domain.
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ChatService o)
Compares this chat service first by their name and then by their service address.
|
ChatRoom |
createRoom(java.lang.String room)
Creates a new chat room.
|
AsyncResult<java.util.List<ChatRoom>> |
discoverRooms()
Discovers the list of chat rooms hosted by this chat service.
|
Jid |
getAddress()
Gets the service address.
|
java.lang.String |
getName()
Gets the name of this service.
|
java.lang.String |
toString() |
public AsyncResult<java.util.List<ChatRoom>> discoverRooms()
Discovers the list of chat rooms hosted by this chat service.
public ChatRoom createRoom(java.lang.String room)
Creates a new chat room. Note that this room is only created locally.
room
- The room. This is the local part of the room address, e.g. room@service.public Jid getAddress()
Gets the service address.
public java.lang.String getName()
Gets the name of this service.
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(ChatService o)
Compares this chat service first by their name and then by their service address.
compareTo
in interface java.lang.Comparable<ChatService>
o
- The other chat service.Copyright © 2014–2019 XMPP.rocks. All rights reserved.