Package org.apache.vysper.xmpp.stanza.dataforms

Examples of org.apache.vysper.xmpp.stanza.dataforms.DataFormEncoder


       
        return form;
    }
   
    public XMLElement createFormXML() {
        return new DataFormEncoder().getXML(createForm());
    }
View Full Code Here


        form.setType(submit);
        form.addField(new Field(null, null, "FORM_TYPE", NamespaceURIs.XEP0045_MUC_REQUEST));

        form.addField(new Field("Requested role", TEXT_SINGLE, "muc#role", "participant"));

        sendMessage(OCCUPANT2_JID, ROOM1_JID, new DataFormEncoder().getXML(form));

        Stanza request = occupant1Queue.getNext();
        assertMessageStanza(ROOM1_JID, OCCUPANT1_JID, null, new VoiceRequestForm(OCCUPANT2_JID, "Nick 2").createFormXML(), request);
    }
View Full Code Here

        form.addField(new Field(null, null, "muc#role", "participant"));
        form.addField(new Field(null, null, "muc#jid", OCCUPANT2_JID.getFullQualifiedName()));
        form.addField(new Field(null, null, "muc#roomnick", "Nick 2"));
        form.addField(new Field(null, null, "muc#request_allow", "true"));

        sendMessage(OCCUPANT1_JID, ROOM1_JID, new DataFormEncoder().getXML(form));

        assertEquals(Role.Participant, room.findOccupantByNick("Nick 2").getRole());

        // verify that remaining users got presence
        assertPresenceStanza(new EntityImpl(ROOM1_JID, "Nick 2"), OCCUPANT2_JID, null,
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.stanza.dataforms.DataFormEncoder

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.