public class ConferenceUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addUnclosableChatRoom(java.lang.String jid) |
static void |
changePresenceToAvailableIfInvisible()
If the current present is 'invisible' then this method change it to
'Online'.
|
static boolean |
confirmToRevealVisibility() |
static void |
createPrivateConference(java.lang.String serviceName,
java.lang.String message,
java.lang.String roomName,
java.util.Collection<java.lang.String> jids)
Creates a private conference.
|
static GroupChatRoom |
enterRoom(org.jivesoftware.smackx.muc.MultiUserChat groupChat,
java.lang.String tabTitle,
java.lang.String nickname,
java.lang.String password) |
static GroupChatRoom |
enterRoomOnSameThread(java.lang.String roomName,
java.lang.String roomJID,
java.lang.String password)
Enters a GroupChatRoom on the event thread.
|
static java.lang.String |
getCreationDate(java.lang.String roomJID)
Retrieve the date (in yyyyMMdd) format of the time the room was created.
|
static int |
getNumberOfOccupants(java.lang.String roomJID)
Return the number of occupants in a room.
|
static java.lang.String |
getReason(org.jivesoftware.smack.packet.XMPPError error)
Returns an explanation for the exception.
|
static java.util.Collection<org.jivesoftware.smackx.muc.HostedRoom> |
getRoomList(java.lang.String serviceName)
Return a list of available Conference rooms from the server
based on the service name.
|
static void |
inviteUsersToRoom(org.jivesoftware.smackx.muc.MultiUserChat chat,
java.util.Collection<java.lang.String> jids,
boolean randomName)
Invites users to an existing room.
|
static void |
inviteUsersToRoom(java.lang.String serviceName,
java.lang.String roomName,
java.util.Collection<java.lang.String> jids,
boolean randomName)
Invites users to an existing room.
|
static boolean |
isChatRoomClosable(java.awt.Component c) |
static boolean |
isPasswordRequired(java.lang.String roomJID)
Returns true if the room requires a password.
|
static void |
joinConferenceOnSeperateThread(java.lang.String roomName,
java.lang.String roomJID,
java.lang.String password) |
static void |
joinConferenceOnSeperateThread(java.lang.String roomName,
java.lang.String roomJID,
java.lang.String password,
java.lang.String inviteMessage,
java.util.Collection<java.lang.String> invites)
Joins a conference room using another thread.
|
static void |
joinConferenceRoom(java.lang.String roomName,
java.lang.String roomJID)
Presents the user with a dialog pre-filled with the room name and the jid.
|
static java.util.List<java.lang.String> |
joinRoom(org.jivesoftware.smackx.muc.MultiUserChat groupChat,
java.lang.String nickname,
java.lang.String password)
Joins a chat room without using the UI.
|
static java.util.Collection<org.jivesoftware.smackx.bookmarks.BookmarkedConference> |
retrieveBookmarkedConferences() |
public static java.util.Collection<org.jivesoftware.smackx.muc.HostedRoom> getRoomList(java.lang.String serviceName) throws java.lang.Exception
serviceName
- the service name (ex. conference@jivesoftware.com)java.lang.Exception
- if an error occured during fetch.public static int getNumberOfOccupants(java.lang.String roomJID) throws org.jivesoftware.smack.SmackException, org.jivesoftware.smack.XMPPException
roomJID
- the full JID of the conference room. (ex. dev@conference.jivesoftware.com)org.jivesoftware.smack.XMPPException
- thrown if an error occured during retrieval of the information.org.jivesoftware.smack.SmackException
public static java.lang.String getCreationDate(java.lang.String roomJID) throws java.lang.Exception
roomJID
- the jid of the room.java.lang.Exception
- throws an exception if we are unable to retrieve the date.public static GroupChatRoom enterRoomOnSameThread(java.lang.String roomName, java.lang.String roomJID, java.lang.String password)
roomName
- the name of the room.roomJID
- the rooms jid.password
- the rooms password (if any).public static GroupChatRoom enterRoom(org.jivesoftware.smackx.muc.MultiUserChat groupChat, java.lang.String tabTitle, java.lang.String nickname, java.lang.String password)
public static void joinConferenceOnSeperateThread(java.lang.String roomName, java.lang.String roomJID, java.lang.String password)
public static void joinConferenceOnSeperateThread(java.lang.String roomName, java.lang.String roomJID, java.lang.String password, java.lang.String inviteMessage, java.util.Collection<java.lang.String> invites)
roomName
- the name of the room.roomJID
- the jid of the room.password
- the rooms password if required.public static void joinConferenceRoom(java.lang.String roomName, java.lang.String roomJID)
roomName
- the name of the room.roomJID
- the rooms jid.public static java.util.List<java.lang.String> joinRoom(org.jivesoftware.smackx.muc.MultiUserChat groupChat, java.lang.String nickname, java.lang.String password)
groupChat
- the MultiUserChat
nickname
- the nickname of the user.password
- the password to join the room with.public static void inviteUsersToRoom(org.jivesoftware.smackx.muc.MultiUserChat chat, java.util.Collection<java.lang.String> jids, boolean randomName)
chat
- The room to invite people into.jids
- a collection of the users to invite.public static void inviteUsersToRoom(java.lang.String serviceName, java.lang.String roomName, java.util.Collection<java.lang.String> jids, boolean randomName)
serviceName
- the service name to use.roomName
- the name of the room.jids
- a collection of the users to invite.public static java.util.Collection<org.jivesoftware.smackx.bookmarks.BookmarkedConference> retrieveBookmarkedConferences() throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException
org.jivesoftware.smack.XMPPException
org.jivesoftware.smack.SmackException
public static boolean isPasswordRequired(java.lang.String roomJID)
roomJID
- the JID of the room.public static void createPrivateConference(java.lang.String serviceName, java.lang.String message, java.lang.String roomName, java.util.Collection<java.lang.String> jids) throws org.jivesoftware.smack.SmackException
serviceName
- the service name to use for the private conference.message
- the message sent to each individual invitee.roomName
- the name of the room to create.jids
- a collection of the user JIDs to invite.org.jivesoftware.smack.SmackException
- thrown if an error occurs during room creation.public static java.lang.String getReason(org.jivesoftware.smack.packet.XMPPError error)
error
- The XMPP errorpublic static void addUnclosableChatRoom(java.lang.String jid)
public static boolean isChatRoomClosable(java.awt.Component c)
public static boolean confirmToRevealVisibility()
public static void changePresenceToAvailableIfInvisible()