Class ChatRoomBookmark
- java.lang.Object
-
- rocks.xmpp.extensions.bookmarks.model.AbstractBookmark
-
- rocks.xmpp.extensions.bookmarks.model.ChatRoomBookmark
-
- All Implemented Interfaces:
Comparable<Bookmark>
,Bookmark
,ConferenceBookmark
public final class ChatRoomBookmark extends AbstractBookmark implements ConferenceBookmark
A conference bookmark to bookmark multi-user chat rooms.This class is immutable.
-
-
Constructor Summary
Constructors Constructor Description ChatRoomBookmark(String name, Jid room)
Creates a conference bookmark.ChatRoomBookmark(String name, Jid room, String nick, String password, boolean autojoin)
Creates a conference bookmark.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getNick()
Gets the user's preferred roomnick for the chatroom.String
getPassword()
Gets the unencrypted string for the password needed to enter a password-protected room.Jid
getRoom()
Gets the JID of the chat room.int
hashCode()
boolean
isAutojoin()
Gets whether the client should automatically join the conference room on login.String
toString()
-
Methods inherited from class rocks.xmpp.extensions.bookmarks.model.AbstractBookmark
compareTo, getName
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Constructor Detail
-
ChatRoomBookmark
public ChatRoomBookmark(String name, Jid room)
Creates a conference bookmark.- Parameters:
name
- The bookmark name.room
- The JID of the chat room.
-
ChatRoomBookmark
public ChatRoomBookmark(String name, Jid room, String nick, String password, boolean autojoin)
Creates a conference bookmark.- Parameters:
name
- The bookmark name.room
- The JID of the chat room.nick
- The user's preferred roomnick for the chatroom.password
- The unencrypted string for the password needed to enter a password-protected room. See alsogetPassword()
.autojoin
- Whether the client should automatically join the conference room on login.
-
-
Method Detail
-
getNick
public final String getNick()
Gets the user's preferred roomnick for the chatroom.- Specified by:
getNick
in interfaceConferenceBookmark
- Returns:
- The nick.
-
getPassword
public final String getPassword()
Gets the unencrypted string for the password needed to enter a password-protected room. For security reasons, use of this element is NOT RECOMMENDED.- Specified by:
getPassword
in interfaceConferenceBookmark
- Returns:
- The password.
-
isAutojoin
public final boolean isAutojoin()
Gets whether the client should automatically join the conference room on login.- Specified by:
isAutojoin
in interfaceConferenceBookmark
- Returns:
- True, if the client should automatically join the conference room on login.
-
getRoom
public final Jid getRoom()
Gets the JID of the chat room.- Returns:
- The room.
-
-