use of org.atmosphere.websocket.WebSocketProcessor in project atmosphere by Atmosphere.
the class ManagedAtmosphereHandlerTest method testWebSocketFactory.
@Test
public void testWebSocketFactory() throws IOException, ServletException {
ByteArrayOutputStream b = new ByteArrayOutputStream();
final WebSocket w = new ArrayBaseWebSocket(b);
final WebSocketProcessor processor = WebSocketProcessorFactory.getDefault().getWebSocketProcessor(framework);
AtmosphereRequest request = new AtmosphereRequestImpl.Builder().destroyable(false).body("yoComet").pathInfo("/websocketfactory").build();
processor.open(w, request, AtmosphereResponseImpl.newInstance(framework.getAtmosphereConfig(), request, w));
assertNotNull(r.get());
assertTrue(Interceptor.invoked);
}
Aggregations