src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java
/**
     * Joins the room with the given name though the given chat room provider.
     *
     * @param chatRoomName the name of the room to join.
     * @param chatRoomProvider the chat room provider to join through.
     */
Joins the room with the given name though the given chat room provider.
@param chatRoomName the name of the room to join.
@param chatRoomProvider the chat room provider to join through.
Joins the room with the given name though the given chat room provider . @param chatRoomName the name of the room to join . @param chatRoomProvider the chat room provider to join through .
public void joinChatRoom(   String chatRoomName,
                                ChatRoomProviderWrapper chatRoomProvider)
    {
        OperationSetMultiUserChat groupChatOpSet
            = chatRoomProvider
                  .getProtocolProvider().getOperationSet(
                    OperationSetMultiUserChat.class);
        ChatRoom chatRoom = null;
        try
        {
            chatRoom = groupChatOpSet.findRoom(chatRoomName);
        }
        catch (Exception e)
        {
            if (logger.isTraceEnabled())
                logger.trace("Un exception occurred while searching for room:"
                + chatRoomName, e);
        }
        if (chatRoom != null)
        {
            ChatRoomWrapper chatRoomWrapper
                = chatRoomList.findChatRoomWrapperFromChatRoom(chatRoom);
            if(chatRoomWrapper == null)
            {
                ChatRoomProviderWrapper parentProvider
                    = chatRoomList
                        .findServerWrapperFromProvider(
                            chatRoom.getParentProvider());
                chatRoomWrapper
                    = new ChatRoomWrapperImpl(parentProvider, chatRoom);
                chatRoomList.addChatRoom(chatRoomWrapper);
                fireChatRoomListChangedEvent(
                    chatRoomWrapper,
                    ChatRoomListChangeEvent.CHAT_ROOM_ADDED);
            }
            joinChatRoom(chatRoomWrapper);
        }
        else
            MUCActivator.getAlertUIService().showAlertDialog(
                MUCActivator.getResources().getI18NString("service.gui.ERROR"),
                MUCActivator.getResources().getI18NString(
                    "service.gui.CHAT_ROOM_NOT_EXIST",
                    new String[]{chatRoomName,
                    chatRoomProvider.getProtocolProvider()
                        .getAccountID().getService()}));
    }
public void joinChatRoom ( String chatRoomName , ChatRoomProviderWrapper chatRoomProvider ) { OperationSetMultiUserChat groupChatOpSet = chatRoomProvider . getProtocolProvider ( ) . getOperationSet ( OperationSetMultiUserChat . class ) ; ChatRoom chatRoom = null ; try { chatRoom = groupChatOpSet . findRoom ( chatRoomName ) ; } catch ( Exception e ) { if ( logger . isTraceEnabled ( ) ) logger . trace ( "Un exception occurred while searching for room:" + chatRoomName , e ) ; } if ( chatRoom != null ) { ChatRoomWrapper chatRoomWrapper = chatRoomList . findChatRoomWrapperFromChatRoom ( chatRoom ) ; if ( chatRoomWrapper == null ) { ChatRoomProviderWrapper parentProvider = chatRoomList . findServerWrapperFromProvider ( chatRoom . getParentProvider ( ) ) ; chatRoomWrapper = new ChatRoomWrapperImpl ( parentProvider , chatRoom ) ; chatRoomList . addChatRoom ( chatRoomWrapper ) ; fireChatRoomListChangedEvent ( chatRoomWrapper , ChatRoomListChangeEvent . CHAT_ROOM_ADDED ) ; } joinChatRoom ( chatRoomWrapper ) ; } else MUCActivator . getAlertUIService ( ) . showAlertDialog ( MUCActivator . getResources ( ) . getI18NString ( "service.gui.ERROR" ) , MUCActivator . getResources ( ) . getI18NString ( "service.gui.CHAT_ROOM_NOT_EXIST" , new String [ ] { chatRoomName , chatRoomProvider . getProtocolProvider ( ) . getAccountID ( ) . getService ( ) } ) ) ; }
Joins the room with the given name though the given chat room provider.
Joins the room with the given name though the given chat room provider .