Examples of removeAtmosphereResource()


Examples of org.atmosphere.util.SimpleBroadcaster.removeAtmosphereResource()

    public void testCloseExcludeCache() throws ExecutionException, InterruptedException, ServletException, IOException {
        UUIDBroadcasterCache cache = new UUIDBroadcasterCache();
        SimpleBroadcaster b = config.getBroadcasterFactory().lookup(SimpleBroadcaster.class, "uuidTest", true);
        b.getBroadcasterConfig().setBroadcasterCache(cache);
        // Reset
        b.removeAtmosphereResource(ar);

        b.addAtmosphereResource(ar);
        b.broadcast("foo").get();

        ar.close();
View Full Code Here

Examples of org.atmosphere.util.SimpleBroadcaster.removeAtmosphereResource()

        b.addAtmosphereResource(ar);
        b.broadcast("foo").get();

        ar.close();
        b.removeAtmosphereResource(ar);

        b.broadcast("raide").get();

        assertEquals(cache.messages().isEmpty(), false);
        List<Object> l = cache.retrieveFromCache(b.getID(), ar.uuid());
View Full Code Here

Examples of org.atmosphere.util.SimpleBroadcaster.removeAtmosphereResource()

    public void testSuspendExcludeCache() throws ExecutionException, InterruptedException, ServletException, IOException {
        UUIDBroadcasterCache cache = new UUIDBroadcasterCache();
        SimpleBroadcaster b = config.getBroadcasterFactory().lookup(SimpleBroadcaster.class, "uuidTest", true);
        b.getBroadcasterConfig().setBroadcasterCache(cache);
        // Reset
        b.removeAtmosphereResource(ar);

        ar.suspend();
        b.removeAtmosphereResource(ar);

        b.broadcast("raide").get();
View Full Code Here

Examples of org.atmosphere.util.SimpleBroadcaster.removeAtmosphereResource()

        b.getBroadcasterConfig().setBroadcasterCache(cache);
        // Reset
        b.removeAtmosphereResource(ar);

        ar.suspend();
        b.removeAtmosphereResource(ar);

        b.broadcast("raide").get();

        // Blocked by the cache because suspend has been called.
        assertEquals(cache.messages().isEmpty(), true);
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.