use of org.jivesoftware.openfire.exception.MUCServiceException in project Openfire by igniterealtime.
the class MUCRoomController method getChatRoom.
/**
* Gets the chat room.
*
* @param roomName
* the room name
* @param serviceName
* the service name
* @return the chat room
* @throws MUCServiceException
* the MUC service exception
*/
public MUCRoomEntity getChatRoom(String roomName, String serviceName) throws MUCServiceException {
MUCRoom chatRoom = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceName).getChatRoom(roomName);
if (chatRoom == null) {
throw new MUCServiceException("Could not fetch the channel", roomName, "Chat room could be not found");
}
MUCRoomEntity mucRoomEntity = convertToMUCRoomEntity(chatRoom);
return mucRoomEntity;
}
Aggregations