use of org.jivesoftware.smackx.muclight.element.MUCLightDestroyIQ in project Smack by igniterealtime.
the class MUCLightDestroyTest method checkDestroyMUCLightStanza.
@Test
public void checkDestroyMUCLightStanza() throws Exception {
MUCLightDestroyIQ mucLightDestroyIQ = new MUCLightDestroyIQ(JidCreate.from("coven@muclight.shakespeare.lit"));
mucLightDestroyIQ.setStanzaId("destroy1");
Assert.assertEquals(mucLightDestroyIQ.toXML().toString(), stanza);
}
use of org.jivesoftware.smackx.muclight.element.MUCLightDestroyIQ in project Smack by igniterealtime.
the class MultiUserChatLight method destroy.
/**
* Destroy the MUC Light. Only will work if it is requested by the owner.
*
* @throws NoResponseException
* @throws XMPPErrorException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void destroy() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
MUCLightDestroyIQ mucLightDestroyIQ = new MUCLightDestroyIQ(room);
IQ responseIq = connection.createStanzaCollectorAndSend(mucLightDestroyIQ).nextResultOrThrow();
boolean roomDestroyed = responseIq.getType().equals(IQ.Type.result);
if (roomDestroyed) {
removeConnectionCallbacks();
}
}
Aggregations