Package org.atmosphere.cpr

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


    AtmosphereResource atmosphereResource = new AtmosphereResourceImpl();
    AtmosphereRequest atmosphereRequest = AtmosphereRequest.wrap(wicketTester.getRequest());
    AtmosphereResponse atmosphereResponse = AtmosphereResponse.wrap(wicketTester.getResponse());
    TesterAsyncSupport asyncSupport = new TesterAsyncSupport();
    atmosphereResource.initialize(broadcaster.getApplicationConfig(), broadcaster, atmosphereRequest, atmosphereResponse,
        asyncSupport, new AtmosphereHandlerAdapter());

    atmosphereResource.setBroadcaster(broadcaster);
    broadcaster.addAtmosphereResource(atmosphereResource);
View Full Code Here


                .method("GET")
                .body(Heartbeat.paddingData)
                .build();
        request.header(X_ATMOSPHERE_TRANSPORT, WEBSOCKET_TRANSPORT);
        request.setAttribute(HeartbeatInterceptor.INTERCEPTOR_ADDED, "");
        res.initialize(res.getAtmosphereConfig(), res.getBroadcaster(), request, AtmosphereResponse.newInstance(), framework.getAsyncSupport(), res.getAtmosphereHandler());
        request.setAttribute(FrameworkConfig.INJECTED_ATMOSPHERE_RESOURCE, res);
        framework.doCometSupport(request, AtmosphereResponse.newInstance());
        assertNotNull(message.get());
        assertEquals(message.get(), Heartbeat.paddingData);
    }
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.