Search in sources :

Example 1 with Streamer

use of org.bimserver.servlets.Streamer in project BIMserver by opensourceBIM.

the class Jsr356Impl method onOpen.

@OnOpen
public void onOpen(Session websocketSession, EndpointConfig config) {
    LOGGER.debug("WebSocket open");
    try {
        this.websocketSession = websocketSession;
        ServletContext servletContext = servletContexts.get(websocketSession.getContainer());
        if (servletContext == null) {
            servletContext = defaultServletContext;
        }
        BimServer bimServer = (BimServer) servletContext.getAttribute("bimserver");
        streamer = new Streamer(this, bimServer);
        streamer.onOpen();
    } catch (Throwable t) {
        LOGGER.error("", t);
    }
}
Also used : Streamer(org.bimserver.servlets.Streamer) BimServer(org.bimserver.BimServer) ServletContext(javax.servlet.ServletContext) OnOpen(javax.websocket.OnOpen)

Aggregations

ServletContext (javax.servlet.ServletContext)1 OnOpen (javax.websocket.OnOpen)1 BimServer (org.bimserver.BimServer)1 Streamer (org.bimserver.servlets.Streamer)1