Search in sources :

Example 6 with MUCLightBlockingIQ

use of org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ in project Smack by igniterealtime.

the class MultiUserChatLightManager method sendUnblockRooms.

private void sendUnblockRooms(DomainBareJid mucLightService, HashMap<Jid, Boolean> rooms) throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
    MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(rooms, null);
    mucLightBlockingIQ.setType(Type.set);
    mucLightBlockingIQ.setTo(mucLightService);
    connection().createStanzaCollectorAndSend(mucLightBlockingIQ).nextResultOrThrow();
}
Also used : MUCLightBlockingIQ(org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ)

Example 7 with MUCLightBlockingIQ

use of org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ in project Smack by igniterealtime.

the class MultiUserChatLightManager method sendBlockRooms.

private void sendBlockRooms(DomainBareJid mucLightService, HashMap<Jid, Boolean> rooms) throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
    MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(rooms, null);
    mucLightBlockingIQ.setType(Type.set);
    mucLightBlockingIQ.setTo(mucLightService);
    connection().createStanzaCollectorAndSend(mucLightBlockingIQ).nextResultOrThrow();
}
Also used : MUCLightBlockingIQ(org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ)

Example 8 with MUCLightBlockingIQ

use of org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ in project Smack by igniterealtime.

the class MultiUserChatLightManager method sendUnblockUsers.

private void sendUnblockUsers(DomainBareJid mucLightService, HashMap<Jid, Boolean> users) throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
    MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(null, users);
    mucLightBlockingIQ.setType(Type.set);
    mucLightBlockingIQ.setTo(mucLightService);
    connection().createStanzaCollectorAndSend(mucLightBlockingIQ).nextResultOrThrow();
}
Also used : MUCLightBlockingIQ(org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ)

Example 9 with MUCLightBlockingIQ

use of org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ in project Smack by igniterealtime.

the class MultiUserChatLightManager method getBlockingList.

private MUCLightBlockingIQ getBlockingList(DomainBareJid mucLightService) throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
    MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(null, null);
    mucLightBlockingIQ.setType(Type.get);
    mucLightBlockingIQ.setTo(mucLightService);
    StanzaFilter responseFilter = new IQReplyFilter(mucLightBlockingIQ, connection());
    IQ responseIq = connection().createStanzaCollectorAndSend(responseFilter, mucLightBlockingIQ).nextResultOrThrow();
    MUCLightBlockingIQ muclIghtBlockingIQResult = (MUCLightBlockingIQ) responseIq;
    return muclIghtBlockingIQResult;
}
Also used : StanzaFilter(org.jivesoftware.smack.filter.StanzaFilter) MUCLightBlockingIQ(org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ) IQReplyFilter(org.jivesoftware.smack.filter.IQReplyFilter) MUCLightBlockingIQ(org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ) IQ(org.jivesoftware.smack.packet.IQ)

Example 10 with MUCLightBlockingIQ

use of org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ in project Smack by igniterealtime.

the class MultiUserChatLightManager method sendBlockUsers.

private void sendBlockUsers(DomainBareJid mucLightService, HashMap<Jid, Boolean> users) throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException {
    MUCLightBlockingIQ mucLightBlockingIQ = new MUCLightBlockingIQ(null, users);
    mucLightBlockingIQ.setType(Type.set);
    mucLightBlockingIQ.setTo(mucLightService);
    connection().createStanzaCollectorAndSend(mucLightBlockingIQ).nextResultOrThrow();
}
Also used : MUCLightBlockingIQ(org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ)

Aggregations

MUCLightBlockingIQ (org.jivesoftware.smackx.muclight.element.MUCLightBlockingIQ)14 Jid (org.jxmpp.jid.Jid)7 Test (org.junit.Test)5 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 DomainBareJid (org.jxmpp.jid.DomainBareJid)3 EntityBareJid (org.jxmpp.jid.EntityBareJid)3 IQ (org.jivesoftware.smack.packet.IQ)2 IQReplyFilter (org.jivesoftware.smack.filter.IQReplyFilter)1 StanzaFilter (org.jivesoftware.smack.filter.StanzaFilter)1