Examples of StreamFeature


Examples of rocks.xmpp.core.stream.model.StreamFeature

        featuresToNegotiate.clear();

        // Check if a feature is known, that means it must implement Feature and be added to the context.
        for (Object feature : featureList) {
            if (feature instanceof StreamFeature) {
                StreamFeature f = (StreamFeature) feature;
                features.put(f.getClass(), f);
                sortedFeatureList.add(f);
            }
        }
        // If the receiving entity advertises only the STARTTLS feature [...] the parties MUST consider TLS as mandatory-to-negotiate.
        if (featureList.size() == 1 && featureList.get(0) instanceof StartTls) {
View Full Code Here

Examples of rocks.xmpp.core.stream.model.StreamFeature

     *
     * @throws Exception If an exception occurred during feature negotiation.
     */
    public void negotiateNextFeature() throws Exception {
        if (featuresToNegotiate.size() > 0) {
            StreamFeature advertisedFeature = featuresToNegotiate.remove(0);

            if (!negotiatedFeatures.contains(advertisedFeature.getClass())) {
                // See if there's a feature negotiator associated with the feature.
                for (StreamFeatureNegotiator streamFeatureNegotiator : streamFeatureNegotiators) {
                    if (streamFeatureNegotiator.getFeatureClass() == advertisedFeature.getClass()) {
                        // If feature negotiation is incomplete, return and wait until it is completed.
                        if (streamFeatureNegotiator.processNegotiation(advertisedFeature) == StreamFeatureNegotiator.Status.INCOMPLETE) {
                            return;
                        }
                    }
View Full Code Here

Examples of rocks.xmpp.core.stream.model.StreamFeature

    }

    @Test
    public void testFeature() throws JAXBException, XMLStreamException {
        String feature = "<register xmlns='http://jabber.org/features/iq-register'/>";
        StreamFeature registerFeature = unmarshal(feature, RegisterFeature.class);
        Assert.assertNotNull(registerFeature);
    }
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.