Examples of StreamFeatureListener


Examples of rocks.xmpp.core.stream.StreamFeatureListener

        reconnectionManager = new ReconnectionManager(this);
        streamFeaturesManager = new StreamFeaturesManager(this);
        chatManager = new ChatManager(this);
        authenticationManager = new AuthenticationManager(this, lock);
        authenticationManager.addFeatureListener(new StreamFeatureListener() {
            @Override
            public void negotiationStatusChanged(StreamFeatureEvent streamFeatureEvent) {
                if (streamFeatureEvent.getStatus() == StreamFeatureNegotiator.Status.INCOMPLETE && streamFeatureEvent.getElement() instanceof Mechanisms) {
                    // Release the waiting thread.
                    lock.lock();
View Full Code Here

Examples of rocks.xmpp.core.stream.StreamFeatureListener

    TcpConnection(XmppSession xmppSession, TcpConnectionConfiguration configuration) {
        super(xmppSession, configuration);
        this.tcpConnectionConfiguration = configuration;

        xmppSession.getStreamFeaturesManager().addFeatureNegotiator(new rocks.xmpp.core.tls.SecurityManager(xmppSession, new StreamFeatureListener() {
            @Override
            public void negotiationStatusChanged(StreamFeatureEvent streamFeatureEvent) throws Exception {
                if (streamFeatureEvent.getStatus() == StreamFeatureNegotiator.Status.SUCCESS) {
                    secureConnection();
                }
            }
        }, configuration.isSecure()));

        xmppSession.getStreamFeaturesManager().addFeatureNegotiator(new CompressionManager(xmppSession, new StreamFeatureListener() {
            @Override
            public void negotiationStatusChanged(StreamFeatureEvent streamFeatureEvent) {
                if (streamFeatureEvent.getStatus() == StreamFeatureNegotiator.Status.SUCCESS) {
                    compressStream();
                }
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.