Examples of SessionStatusListener


Examples of org.jdesktop.wonderland.client.comms.SessionStatusListener

        frame.connected(true);

        // Listen for session disconnected and remove session physics and
        // collision systems
        curSession.addSessionStatusListener(new SessionStatusListener() {

            public void sessionStatusChanged(
                    WonderlandSession session, Status status) {
                if (status == Status.DISCONNECTED) {
                    ServerSessionManager serverSessionManager =
View Full Code Here

Examples of org.jdesktop.wonderland.client.comms.SessionStatusListener

            // log in to the session
            session.login(loginControl.getLoginParameters());

            // the session was created successfully.  Add it to our list of
            // sessions, and add a listener to remove it when it disconnects
            session.addSessionStatusListener(new SessionStatusListener() {
                public void sessionStatusChanged(WonderlandSession session,
                                                 Status status)
                {
                    synchronized (ServerSessionManager.this) {
                        if (status.equals(Status.DISCONNECTED)) {
View Full Code Here

Examples of org.jdesktop.wonderland.client.comms.SessionStatusListener

        }

        // add a listener that will remove the primary session if the session
        // disconnects
        if (primarySession != null) {
            primarySession.addSessionStatusListener(new SessionStatusListener() {
                public void sessionStatusChanged(WonderlandSession session,
                                                 Status status)
                {
                    if (status == Status.DISCONNECTED) {
                        synchronized (primarySessionLock) {
View Full Code Here

Examples of org.jdesktop.wonderland.client.comms.SessionStatusListener

            throw new RuntimeException("Unable to create session.");
        }

        // add a listener that will attempt to log in again when the server
        // disconnects
        curSession.addSessionStatusListener(new SessionStatusListener() {
            public void sessionStatusChanged(WonderlandSession session,
                                             WonderlandSession.Status status)
            {
                // Give the subclass a chance to clean up before we reconnect
                cleanup();
View Full Code Here

Examples of rocks.xmpp.core.session.SessionStatusListener

    private ByteArrayOutputStream outputStreamOutgoing;

    @Override
    public void initialize(final XmppSession xmppSession) {
        final SessionStatusListener connectionListener = new SessionStatusListener() {
            @Override
            public void sessionStatusChanged(final SessionStatusEvent e) {
                waitForPlatform();
                Platform.runLater(new Runnable() {
                    @Override
View Full Code Here

Examples of rocks.xmpp.core.session.SessionStatusListener

                    }
                }
            }
        });

        xmppSession.addSessionStatusListener(new SessionStatusListener() {
            @Override
            public void sessionStatusChanged(SessionStatusEvent e) {
                // Resend the last presences, as soon as we are reconnected.
                if (e.getStatus() == XmppSession.Status.AUTHENTICATED) {
                    for (Presence presence : lastSentPresences.values()) {
View Full Code Here

Examples of rocks.xmpp.core.session.SessionStatusListener

     *
     * @param xmppSession The connection, features will be negotiated for.
     */
    public StreamFeaturesManager(XmppSession xmppSession) {

        xmppSession.addSessionStatusListener(new SessionStatusListener() {
            @Override
            public void sessionStatusChanged(SessionStatusEvent e) {
                switch (e.getStatus()) {
                    // If we're (re)connecting, make sure any previous features are forgotten.
                    case CONNECTING:
View Full Code Here

Examples of rocks.xmpp.core.session.SessionStatusListener

    private final Set<GeoLocationListener> geoLocationListeners = new CopyOnWriteArraySet<>();

    private GeoLocationManager(XmppSession xmppSession) {
        super(xmppSession, GeoLocation.NAMESPACE, GeoLocation.NAMESPACE + "+notify");

        xmppSession.addSessionStatusListener(new SessionStatusListener() {
            @Override
            public void sessionStatusChanged(SessionStatusEvent e) {
                if (e.getStatus() == XmppSession.Status.CLOSED) {
                    geoLocationListeners.clear();
                }
View Full Code Here

Examples of rocks.xmpp.core.session.SessionStatusListener

        super(xmppSession, Rpc.NAMESPACE);

        executorService = Executors.newCachedThreadPool();

        // Reset the rpcHandler, when the connection is closed, to avoid memory leaks.
        xmppSession.addSessionStatusListener(new SessionStatusListener() {
            @Override
            public void sessionStatusChanged(SessionStatusEvent e) {
                if (e.getStatus() == XmppSession.Status.CLOSED) {
                    rpcHandler = null;
                    executorService.shutdown();
View Full Code Here

Examples of rocks.xmpp.core.session.SessionStatusListener

    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);

    private ServiceDiscoveryManager(final XmppSession xmppSession) {
        super(xmppSession, "http://jabber.org/protocol/disco#info", "http://jabber.org/protocol/disco#items");

        xmppSession.addSessionStatusListener(new SessionStatusListener() {
            @Override
            public void sessionStatusChanged(SessionStatusEvent e) {
                if (e.getStatus() == XmppSession.Status.CLOSED) {
                    for (PropertyChangeListener propertyChangeListener : pcs.getPropertyChangeListeners()) {
                        pcs.removePropertyChangeListener(propertyChangeListener);
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.