Package org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.X


        Stanza error = enterRoom(OCCUPANT1_JID, ROOM1_JID_WITH_NICK); // 2nd join
        assertNull(error);
        final Stanza stanza1 = occupant1Queue.getNext();
        final Stanza stanza2 = occupant1Queue.getNext();
        final XMLElementVerifier verifier = stanza2.getVerifier();
        final X x = X.fromStanza(stanza2);
        final List<XMLElement> statuses = x.getInnerElementsNamed("status");
        boolean rewriteCode = false;
        for (XMLElement status : statuses) {
            final String code = status.getAttributeValue("code");
            if ("210".equals(code)) rewriteCode = true;
        }
View Full Code Here


        room.setPassword("secret");
        room.addOccupant(OCCUPANT1_JID, "nick");

        Invite invite = new Invite(null, OCCUPANT2_JID, reason);
        // send message to occupant 1
        assertNull(sendMessage(OCCUPANT1_JID, ROOM1_JID, null, null, new X(NamespaceURIs.XEP0045_MUC_USER, invite), null));

        X expectedX = new X(new Invite(OCCUPANT1_JID, null, reason), new Password("secret"));
        // verify stanzas to existing occupants on the exiting user
        assertMessageStanza(ROOM1_JID, OCCUPANT2_JID, null, null, null, expectedX, occupant2Queue.getNext());
        assertNull(occupant1Queue.getNext());
    }
View Full Code Here

        Room room = conference.findOrCreateRoom(ROOM1_JID, "Room 1");
        room.addOccupant(OCCUPANT2_JID, "nick");

        Decline decline = new Decline(null, OCCUPANT2_JID, reason);
        // send message to occupant 1
        Stanza error = sendMessage(OCCUPANT1_JID, ROOM1_JID, null, null, new X(NamespaceURIs.XEP0045_MUC_USER, decline), null);
        assertNull(error);

        X expectedX = new X(new Decline(OCCUPANT1_JID, null, reason));
        // verify stanzas to existing occupants on the exiting user
        assertMessageStanza(ROOM1_JID, OCCUPANT2_JID, null, null, null, expectedX, occupant2Queue.getNext());
        assertNull(occupant1Queue.getNext());
    }
View Full Code Here

        room.setPassword("secret");
        room.addOccupant(OCCUPANT1_JID, "nick");

        Invite invite = new Invite(null, OCCUPANT2_JID, reason);
        // send message to occupant 1
        assertNull(sendMessage(OCCUPANT1_JID, ROOM1_JID, null, null, new X(invite), null));

        X expectedX = new X(new Invite(OCCUPANT1_JID, null, reason), new Password("secret"));
        // verify stanzas to existing occupants on the exiting user
        assertMessageStanza(ROOM1_JID, OCCUPANT2_JID, null, null, null, expectedX, occupant2Queue.getNext());
        assertNull(occupant1Queue.getNext());
    }
View Full Code Here

        Room room = conference.findOrCreateRoom(ROOM1_JID, "Room 1");
        room.addOccupant(OCCUPANT2_JID, "nick");

        Decline decline = new Decline(null, OCCUPANT2_JID, reason);
        // send message to occupant 1
        Stanza error = sendMessage(OCCUPANT1_JID, ROOM1_JID, null, null, new X(decline), null);
        assertNull(error);

        X expectedX = new X(new Decline(OCCUPANT1_JID, null, reason));
        // verify stanzas to existing occupants on the exiting user
        assertMessageStanza(ROOM1_JID, OCCUPANT2_JID, null, null, null, expectedX, occupant2Queue.getNext());
        assertNull(occupant1Queue.getNext());
    }
View Full Code Here

        assertEquals(expectedBody, msgStanza.getBody(null));
        assertEquals(expectedSubject, msgStanza.getSubject(null));

        if (expectedX != null) {
            X actualX = X.fromStanza(stanza);
            assertEquals(expectedX, actualX);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.X

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.