*/
public static <T> ActorRef<T> attachWebActor(ServletContext sc, Collection<String> webSocketURIs, ActorRef<T> actor) {
final ServerContainer scon = (ServerContainer) sc.getAttribute("javax.websocket.server.ServerContainer");
for (String webSocketURI : webSocketURIs) {
try {
scon.addEndpoint(ServerEndpointConfig.Builder.create(WebActorEndpoint.class, webSocketURI).configurator(new EmbedHttpSessionWsConfigurator()).build());
} catch (DeploymentException ex) {
sc.log("Unable to deploy endpoint", ex);
}
}
return actor;