public MucCreateConfigFormHandle createOrJoinIfNecessary ( Resourcepart nickname , String password ) throws NoResponseException , XMPPErrorException , NotConnectedException , InterruptedException , NotAMucServiceException { if ( isJoined ( ) ) { return null ; } MucEnterConfiguration mucEnterConfiguration = getEnterConfigurationBuilder ( nickname ) . withPassword ( password ) . build ( ) ; try { return createOrJoin ( mucEnterConfiguration ) ; } catch ( MucAlreadyJoinedException e ) { return null ; } }
Create or join a MUC if it is necessary i . e . if not the MUC is not already joined .