Examples of uuid()


Examples of org.atmosphere.cpr.AtmosphereResource.uuid()

        asyncSupport, new AtmosphereHandlerAdapter());

    atmosphereResource.setBroadcaster(broadcaster);
    broadcaster.addAtmosphereResource(atmosphereResource);

    String uuid = atmosphereResource.uuid();
    Page page = getComponent().getPage();

    page.setMetaData(ATMOSPHERE_UUID, uuid);
    eventBus.registerPage(uuid, page);
  }
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResource.uuid()

            }

            PushMode pushMode = ui.getPushConfiguration().getPushMode();
            AtmospherePushConnection pushConnection = getConnectionForUI(ui);

            String id = resource.uuid();

            if (pushConnection == null) {
                getLogger()
                        .log(Level.WARNING,
                                "Could not find push connection to close: {0} with transport {1}",
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResource.uuid()

                            if (resource == null) {
                                logger.debug("No resource was suspended, resuming the second connection.");
                            } else {

                                logger.trace("Resuming {}", resource.uuid());

                                try {
                                    OutputStream o = resource.getResponse().getResponse().getOutputStream();
                                    o.write(data);
                                    o.flush();
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResource.uuid()

                framework.getAsyncSupport());

        boolean cleanUpAfterDisconnect = false;
        try {
            request.setAttribute(INJECTED_ATMOSPHERE_RESOURCE, r);
            request.setAttribute(SUSPENDED_ATMOSPHERE_RESOURCE_UUID, r.uuid());

            if (Utils.firefoxWebSocketEnabled(request)) {
                request.setAttribute("firefox", "true");
            }
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResource.uuid()

        } catch (Exception ex) {
            logger.trace("onOpen exception", ex);
            cleanUpAfterDisconnect = true;
        } finally {
            if (cleanUpAfterDisconnect) {
                logger.warn("Problem opening websocket for {}", r.uuid());
                framework.atmosphereFactory().remove(r.uuid());

                AtmosphereResourceEventImpl.class.cast(r.getAtmosphereResourceEvent()).setCancelled(true);
                AsynchronousProcessor.class.cast(framework.getAsyncSupport()).completeLifecycle(r, true);
            }
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResource.uuid()

            logger.trace("onOpen exception", ex);
            cleanUpAfterDisconnect = true;
        } finally {
            if (cleanUpAfterDisconnect) {
                logger.warn("Problem opening websocket for {}", r.uuid());
                framework.atmosphereFactory().remove(r.uuid());

                AtmosphereResourceEventImpl.class.cast(r.getAtmosphereResourceEvent()).setCancelled(true);
                AsynchronousProcessor.class.cast(framework.getAsyncSupport()).completeLifecycle(r, true);
            }
        }
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResourceImpl.uuid()

                                AtmosphereResourceImpl resource = session.getAtmosphereResourceImpl();
                                // if BroadcastCache is available, add the message to the cache
                                if (resource != null && DefaultBroadcaster.class.isAssignableFrom(resource.getBroadcaster().getClass())) {
                                    resource.getBroadcaster().getBroadcasterConfig().getBroadcasterCache().
                                            addToCache(resource.getBroadcaster().getID(), resource.uuid(),
                                                    new BroadcastMessage(msg));
                                }
                            }
                            break;
                        default:
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResourceImpl.uuid()

                                StringBuilder data = new StringBuilder();
                                // if there is a Broadcaster cache, retrieve the messages from the cache, and send them
                                if (DefaultBroadcaster.class.isAssignableFrom(resource.getBroadcaster().getClass())) {

                                    List<Object> cachedMessages = resource.getBroadcaster().getBroadcasterConfig().getBroadcasterCache()
                                            .retrieveFromCache(resource.getBroadcaster().getID(), resource.uuid());

                                    if (cachedMessages != null && !cachedMessages.isEmpty()) {
                                        if (cachedMessages.size() > 1) {
                                            for (Object object : cachedMessages) {
                                                String msg = object.toString();
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResourceImpl.uuid()

        asyncSupport, new AtmosphereHandlerAdapter());

    atmosphereResource.setBroadcaster(broadcaster);
    broadcaster.addAtmosphereResource(atmosphereResource);

    String uuid = atmosphereResource.uuid();
    Page page = getComponent().getPage();

    page.setMetaData(ATMOSPHERE_UUID, uuid);
    eventBus.registerPage(uuid, page);
  }
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereResourceImpl.uuid()

        if (remoteEndpoint != null) {
            if (event.isCancelled() || event.isClosedByClient()) {
                remoteEndpoint.status().status(event.isCancelled() ? Status.STATUS.UNEXPECTED_CLOSE : Status.STATUS.CLOSED_BY_CLIENT);
                request.removeAttribute(RemoteEndpointImpl.class.getName());
                trackedUUID.remove(r.uuid());

                invokeOpenOrClose(onCloseMethod, remoteEndpoint);
            } else if (event.isResumedOnTimeout() || event.isResuming()) {
                remoteEndpoint.status().status(Status.STATUS.CLOSED_BY_TIMEOUT);
                request.removeAttribute(RemoteEndpointImpl.class.getName());
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.