Search in sources :

Example 1 with MUCLightDestroyIQ

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);
}
Also used : MUCLightDestroyIQ(org.jivesoftware.smackx.muclight.element.MUCLightDestroyIQ) Test(org.junit.Test)

Example 2 with MUCLightDestroyIQ

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();
    }
}
Also used : MUCLightDestroyIQ(org.jivesoftware.smackx.muclight.element.MUCLightDestroyIQ) MUCLightDestroyIQ(org.jivesoftware.smackx.muclight.element.MUCLightDestroyIQ) MUCLightChangeAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightChangeAffiliationsIQ) MUCLightConfigurationIQ(org.jivesoftware.smackx.muclight.element.MUCLightConfigurationIQ) MUCLightInfoIQ(org.jivesoftware.smackx.muclight.element.MUCLightInfoIQ) MUCLightGetAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ) MUCLightGetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightGetConfigsIQ) MUCLightCreateIQ(org.jivesoftware.smackx.muclight.element.MUCLightCreateIQ) MUCLightAffiliationsIQ(org.jivesoftware.smackx.muclight.element.MUCLightAffiliationsIQ) MUCLightSetConfigsIQ(org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ) MUCLightGetInfoIQ(org.jivesoftware.smackx.muclight.element.MUCLightGetInfoIQ) IQ(org.jivesoftware.smack.packet.IQ)

Aggregations

MUCLightDestroyIQ (org.jivesoftware.smackx.muclight.element.MUCLightDestroyIQ)2 IQ (org.jivesoftware.smack.packet.IQ)1 MUCLightAffiliationsIQ (org.jivesoftware.smackx.muclight.element.MUCLightAffiliationsIQ)1 MUCLightChangeAffiliationsIQ (org.jivesoftware.smackx.muclight.element.MUCLightChangeAffiliationsIQ)1 MUCLightConfigurationIQ (org.jivesoftware.smackx.muclight.element.MUCLightConfigurationIQ)1 MUCLightCreateIQ (org.jivesoftware.smackx.muclight.element.MUCLightCreateIQ)1 MUCLightGetAffiliationsIQ (org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ)1 MUCLightGetConfigsIQ (org.jivesoftware.smackx.muclight.element.MUCLightGetConfigsIQ)1 MUCLightGetInfoIQ (org.jivesoftware.smackx.muclight.element.MUCLightGetInfoIQ)1 MUCLightInfoIQ (org.jivesoftware.smackx.muclight.element.MUCLightInfoIQ)1 MUCLightSetConfigsIQ (org.jivesoftware.smackx.muclight.element.MUCLightSetConfigsIQ)1 Test (org.junit.Test)1