Search in sources :

Example 1 with WebSocketBehavior

use of org.eclipse.jetty.websocket.api.WebSocketBehavior in project CQ-Actions by Cognifide.

the class MessageWebsocketServlet method activate.

@Activate
public void activate() throws Exception {
    WebSocketBehavior behavior = WebSocketBehavior.SERVER;
    WebSocketPolicy policy = new WebSocketPolicy(behavior);
    webSocketFactory = new WebSocketServerFactory(policy);
    webSocketFactory.register(MessageSocket.class);
    webSocketFactory.setCreator(this);
    webSocketFactory.start();
}
Also used : WebSocketPolicy(org.eclipse.jetty.websocket.api.WebSocketPolicy) WebSocketServerFactory(org.eclipse.jetty.websocket.server.WebSocketServerFactory) WebSocketBehavior(org.eclipse.jetty.websocket.api.WebSocketBehavior) Activate(org.apache.felix.scr.annotations.Activate)

Aggregations

Activate (org.apache.felix.scr.annotations.Activate)1 WebSocketBehavior (org.eclipse.jetty.websocket.api.WebSocketBehavior)1 WebSocketPolicy (org.eclipse.jetty.websocket.api.WebSocketPolicy)1 WebSocketServerFactory (org.eclipse.jetty.websocket.server.WebSocketServerFactory)1