LOG.warning("Cannot restore sessions");
}
}
public void addWebSocketServlets() {
// Servlet where the websocket connection is served from.
ServletHolder wsholder = addServlet("/socket", WaveWebSocketServlet.class);
// TODO(zamfi): fix to let messages span frames.
wsholder.setInitParameter("bufferSize", "" + BUFFER_SIZE);
// Atmosphere framework. Replacement of Socket.IO
// See https://issues.apache.org/jira/browse/WAVE-405
ServletHolder atholder = addServlet("/atmosphere*", AtmosphereGuiceServlet.class);
// Enable guice. See
// https://github.com/Atmosphere/atmosphere/wiki/Configuring-Atmosphere%27s-Classes-Creation-and-Injection
atholder.setInitParameter("org.atmosphere.cpr.objectFactory",
"org.waveprotocol.box.server.rpc.atmosphere.GuiceAtmosphereFactory");
atholder.setAsyncSupported(true);
atholder.setInitOrder(0);
// Serve the static content and GWT web client with the default servlet
// (acts like a standard file-based web server).
addServlet("/static/*", DefaultServlet.class);
addServlet("/webclient/*", DefaultServlet.class);