public void leave ( ) throws NotConnectedException , InterruptedException , NoResponseException , XMPPErrorException { HashMap < Jid , MUCLightAffiliation > affiliations = new HashMap <> ( ) ; affiliations . put ( connection . getUser ( ) , MUCLightAffiliation . none ) ; MUCLightChangeAffiliationsIQ changeAffiliationsIQ = new MUCLightChangeAffiliationsIQ ( room , affiliations ) ; IQ responseIq = connection . createStanzaCollectorAndSend ( changeAffiliationsIQ ) . nextResultOrThrow ( ) ; boolean roomLeft = responseIq . getType ( ) . equals ( IQ . Type . result ) ; if ( roomLeft ) { removeConnectionCallbacks ( ) ; } }
Leave the MUCLight .