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

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


        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


       
        StanzaBuilder stanzaBuilder = StanzaBuilder.createPresenceStanza(occupantJid, roomJid, null, null, null, null);
        if(!oldProtocol) {
          List<XMLElement> xInnerElms = new ArrayList<XMLElement>();
            if(password != null) {
              xInnerElms.add(new Password(password));
            }
            if(history != null) {
              xInnerElms.add(history);
            }
            stanzaBuilder.addPreparedElement(new X(xInnerElms));
View Full Code Here

    public static Stanza createInviteDeclineMessageStanza(Stanza original, Entity to, String password, AbstractInviteDecline invdec) throws EntityFormatException {
        StanzaBuilder builder = StanzaBuilder.createMessageStanza(original.getTo(), to, null, null);
        List<XMLElement> inner = new ArrayList<XMLElement>();
        inner.add(invdec);
        if(password != null) {
            inner.add(new Password(password));
        }
       
        X newX = new X(NamespaceURIs.XEP0045_MUC_USER, inner);
        builder.addPreparedElement(newX);
        return builder.build();
View Full Code Here

        StanzaBuilder stanzaBuilder = StanzaBuilder.createPresenceStanza(occupantJid, roomJid, null, null, null, null);
        if (!oldProtocol) {
            List<XMLElement> xInnerElms = new ArrayList<XMLElement>();
            if (password != null) {
                xInnerElms.add(new Password(password));
            }
            if (history != null) {
                xInnerElms.add(history);
            }
            stanzaBuilder.addPreparedElement(new X(xInnerElms));
View Full Code Here

            AbstractInviteDecline invdec) throws EntityFormatException {
        StanzaBuilder builder = StanzaBuilder.createMessageStanza(original.getTo(), to, null, null);
        List<XMLElement> inner = new ArrayList<XMLElement>();
        inner.add(invdec);
        if (password != null) {
            inner.add(new Password(password));
        }

        X newX = new X(NamespaceURIs.XEP0045_MUC_USER, inner);
        builder.addPreparedElement(newX);
        return builder.build();
View Full Code Here

        StanzaBuilder stanzaBuilder = StanzaBuilder.createPresenceStanza(occupantJid, roomJid, null, null, null, null);
        if (!oldProtocol) {
            List<XMLElement> xInnerElms = new ArrayList<XMLElement>();
            if (password != null) {
                xInnerElms.add(new Password(password));
            }
            if (history != null) {
                xInnerElms.add(history);
            }
            stanzaBuilder.addPreparedElement(new X(xInnerElms));
View Full Code Here

        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

        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

TOP

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

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.