Package org.apache.vysper.xmpp.stanza

Examples of org.apache.vysper.xmpp.stanza.StanzaBuilder.declareNamespace()


    private Stanza buildResponse(IQStanza stanza, Entity from, String commandNode, String sessionId,
                                 final String status, XMLElement result,
                                 List<Note> notes, boolean isPrevAllowed, boolean isNextAllowed) {
        final StanzaBuilder iqStanza = StanzaBuilder.createIQStanza(null, from, IQStanzaType.RESULT, stanza.getID());
        iqStanza.startInnerElement("command");
        iqStanza.declareNamespace("", NamespaceURIs.XEP0050_ADHOC_COMMANDS);
        iqStanza.addAttribute("node", commandNode);
        iqStanza.addAttribute("sessionid", sessionId);
        iqStanza.addAttribute("status", status);
        if (notes != null && notes.size() > 0) {
            for (Note note : notes) {
View Full Code Here


        }
       
        StanzaBuilder stanzaBuilder = getStreamOpener(false, from, sessionContext.getXMLLang(), version,
                sessionContext.getSessionId(), features);

        stanzaBuilder.declareNamespace("db", NamespaceURIs.JABBER_SERVER_DIALBACK);
        return stanzaBuilder.build();
    }

    public Stanza getStreamOpenerForServerConnector(Entity from, Entity to, XMPPVersion version, SessionContext sessionContext) {
        StanzaBuilder stanzaBuilder = getStreamOpener(false, from, sessionContext.getXMLLang(), version,
View Full Code Here

    public Stanza getStreamOpenerForServerConnector(Entity from, Entity to, XMPPVersion version, SessionContext sessionContext) {
        StanzaBuilder stanzaBuilder = getStreamOpener(false, from, sessionContext.getXMLLang(), version,
                null, null);
        stanzaBuilder.addAttribute("to", to.getDomain());
        stanzaBuilder.declareNamespace("db", NamespaceURIs.JABBER_SERVER_DIALBACK);
        return stanzaBuilder.build();
    }

   
    public StanzaBuilder getStreamOpener(boolean forClient, Entity from, String xmlLang, XMPPVersion version,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.