Package org.apache.vysper.xmpp.stanza

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


        if (notes != null && notes.size() > 0) {
            for (Note note : notes) {
                iqStanza.startInnerElement("note");
                iqStanza.addAttribute("type", note.getType().name());
                if (note.getText() != null) iqStanza.addText(note.getText());
                iqStanza.endInnerElement();
            }
        }
        if (isNextAllowed || isPrevAllowed) {
            iqStanza.startInnerElement("action");
            if (isPrevAllowed) iqStanza.startInnerElement("prev").endInnerElement();
View Full Code Here


        }
        if (isNextAllowed || isPrevAllowed) {
            iqStanza.startInnerElement("action");
            if (isPrevAllowed) iqStanza.startInnerElement("prev").endInnerElement();
            if (isNextAllowed) iqStanza.startInnerElement("next").endInnerElement();
            iqStanza.endInnerElement();
        }
        if (result != null) {
            iqStanza.addPreparedElement(result);
        }
        iqStanza.endInnerElement();
View Full Code Here

            iqStanza.endInnerElement();
        }
        if (result != null) {
            iqStanza.addPreparedElement(result);
        }
        iqStanza.endInnerElement();

        return iqStanza.build();
    }
/*
<iq from='shakespeare.lit'
View Full Code Here

        }
        for (InfoElement infoElement : elements) {
            infoElement.insertElement(stanzaBuilder);
        }

        stanzaBuilder.endInnerElement();

        return stanzaBuilder.build();
    }
}
View Full Code Here

        stanzaBuilder.startInnerElement("starttls", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS);
        if (sessionContext.getServerRuntimeContext().getServerFeatures().isStartTLSRequired()) {
            stanzaBuilder.startInnerElement("required", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_TLS)
                    .endInnerElement();
        }
        stanzaBuilder.endInnerElement();
        if(sessionContext.getServerRuntimeContext().getModule(InBandRegistrationModule.class) != null) {
            // In-band registration active, show as feature
            stanzaBuilder.startInnerElement("register", NamespaceURIs.JABBER_ORG_FEATURES_IQ_REGISTER);
        }
View Full Code Here

        stanzaBuilder.startInnerElement("mechanisms", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL);
        for (SASLMechanism authenticationMethod : authenticationMethods) {
            stanzaBuilder.startInnerElement("mechanism", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SASL).addText(
                    authenticationMethod.getName()).endInnerElement();
        }
        stanzaBuilder.endInnerElement();

        return stanzaBuilder.build();
    }

    public Stanza getFeaturesForSession() {
View Full Code Here

    public Stanza getFeaturesForSession() {
        StanzaBuilder stanzaBuilder = startFeatureStanza();

        stanzaBuilder.startInnerElement("bind", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_BIND).startInnerElement(
                "required", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_BIND).endInnerElement();
        stanzaBuilder.endInnerElement();

        // session establishment is here for RFC3921 compatibility and is planed to be removed in revisions of this RFC.
        stanzaBuilder.startInnerElement("session", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SESSION)
                .startInnerElement("required", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SESSION).endInnerElement();
        stanzaBuilder.endInnerElement();
View Full Code Here

        stanzaBuilder.endInnerElement();

        // session establishment is here for RFC3921 compatibility and is planed to be removed in revisions of this RFC.
        stanzaBuilder.startInnerElement("session", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SESSION)
                .startInnerElement("required", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_SESSION).endInnerElement();
        stanzaBuilder.endInnerElement();

        return stanzaBuilder.build();
    }

    protected StanzaBuilder startFeatureStanza() {
View Full Code Here

        List<SubscriptionItem> subscriptions = collectSubscriptions(root, sender, nodeName);

        buildSuccessStanza(sb, nodeName, subscriptions);

        sb.endInnerElement(); // pubsub
        return new IQStanza(sb.build());
    }

    /**
     * Traverses through all nodes or a single node to collect all subscriptions of the user.
View Full Code Here

        public Stanza getStanza(Entity client, Entity pubsub, String id) {
            StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(client, pubsub, getStanzaType(), id);
            stanzaBuilder.startInnerElement("query", getNamespace());

            stanzaBuilder.endInnerElement();

            return stanzaBuilder.build();
        }

        @Override
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.