*
* @param roomName
* the name of the ChatRoom to create.
* @param roomProperties
* properties specifying how the room should be created;
* null for no properties just like an empty
*
* @param roomName the name of the ChatRoom that we're looking for.
* @return the ChatRoom named roomName if it exists, null
* otherwise.
*
* @throws OperationFailedException if an error occurs while trying to
* discover the room on the server.
* @throws OperationNotSupportedException if the server does not support
* multi-user chat
*/
public ChatRoom findRoom(String roomName)
throws OperationFailedException, OperationNotSupportedException;
/**
* Informs the sender of an invitation that we decline their invitation.
*
* @param invitation the invitation we are rejecting.
* @param rejectReason the reason to reject the invitation (optional)
*/
public void rejectInvitation(ChatRoomInvitation invitation,
String rejectReason);
/**
* Adds a listener to invitation notifications. The listener will be fired
* anytime an invitation is received.
*
* @param listener an invitation listener.
*/
public void addInvitationListener(ChatRoomInvitationListener listener);
/**
* Removes listener from the list of invitation listeners
* registered to receive invitation events.
*
* @param listener the invitation listener to remove.
*/
public void removeInvitationListener(ChatRoomInvitationListener listener);
/**
* Adds a listener to invitation notifications. The listener will be fired
* anytime an invitation is received.
*
* @param listener an invitation listener.
*/
public void addInvitationRejectionListener(
ChatRoomInvitationRejectionListener listener);
/**
* Removes the given listener from the list of invitation listeners
* registered to receive events every time an invitation has been rejected.
*
* @param listener the invitation listener to remove.
*/
public void removeInvitationRejectionListener(
ChatRoomInvitationRejectionListener listener);
/**
* Returns true if contact supports multi-user chat sessions.
*
* @param contact reference to the contact whose support for chat rooms
* we are currently querying.
* @return a boolean indicating whether contact supports chat rooms.
*/
public boolean isMultiChatSupportedByContact(Contact contact);
/**
* Adds a listener that will be notified of changes in our participation in
* a chat room such as us being kicked, joined, left.
*
* @param listener a local user participation listener.
*/
public void addPresenceListener(
LocalUserChatRoomPresenceListener listener);
/**
* Removes a listener that was being notified of changes in our
* participation in a room such as us being kicked, joined, left.
*
* @param listener a local user participation listener.
*/
public void removePresenceListener(
LocalUserChatRoomPresenceListener listener);
}
Map
* @throws OperationFailedException
* if the room couldn't be created for some reason (e.g. room
* already exists; user already joined to an existent room or
* user has no permissions to create a chat room).
* @throws OperationNotSupportedException
* if chat room creation is not supported by this server
*
* @return the newly created ChatRoom named roomName.
*/
public ChatRoom createChatRoom(String roomName,
Map