Package org.atmosphere.cpr

Examples of org.atmosphere.cpr.AtmosphereResourceEvent


            byte[] body = IOUtils.readEntirelyAsByte(r);

            if (Arrays.equals(paddingBytes, body)) {
                // Dispatch an event to notify that a heartbeat has been intercepted
                // TODO: see https://github.com/Atmosphere/atmosphere/issues/1561
                final AtmosphereResourceEvent event = new HeartbeatAtmosphereResourceEvent(AtmosphereResourceImpl.class.cast(r));

                if (AtmosphereResourceHeartbeatEventListener.class.isAssignableFrom(r.getAtmosphereHandler().getClass())) {
                    r.addEventListener(new AtmosphereResourceEventListenerAdapter.OnHeartbeat() {
                        @Override
                        public void onHeartbeat(AtmosphereResourceEvent event) {
View Full Code Here


        @Override
        public void onRemoveAtmosphereResource(Broadcaster b, AtmosphereResource r) {
            // We track cancelled and resumed connection only.
            BroadcasterTracker t = states.get(r.uuid());
            AtmosphereResourceEvent e = r.getAtmosphereResourceEvent();
            if (e.isClosedByClient() || !r.isResumed() && !e.isResumedOnTimeout()) {
                logger.trace("Deleting the state of {} with broadcaster {}", r.uuid(), b.getID());
                if (t != null) {
                    t.remove(b);
                }
            } else {
View Full Code Here

TOP

Related Classes of org.atmosphere.cpr.AtmosphereResourceEvent

Copyright © 2018 www.massapicom. 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.