public final class ServletWebActors extends Object
Static methods to attach web actors with HTTP and WebSocket sessions
| Modifier and Type | Method and Description |
|---|---|
static <T> ActorRef<T> |
attachWebActor(HttpSession session,
ActorRef<T> actor)
Attaches the given web actor to the given
HttpSession. |
static <T> ActorRef<T> |
attachWebActor(ServletContext sc,
Collection<String> webSocketURIs,
ActorRef<T> actor)
Attaches the given web actor to web socket sessions that will be opened at the given URIs (or URI patterns).
|
static <T> ActorRef<T> |
attachWebActor(ServletContext sc,
String webSocketURI,
ActorRef<T> actor)
Attaches the given web actor to web socket sessions that will be opened at the given URI (or URI pattern).
|
static <T> ActorRef<T> |
attachWebActor(Session session,
EndpointConfig config,
ActorRef<T> actor)
Attaches the given web actor to the given WebSocket session
|
static <T> ActorRef<T> |
attachWebActor(Session session,
HttpSession httpSession,
ActorRef<T> actor)
Attaches the given web actor to the given WebSocket session
|
static ActorRef<? super co.paralleluniverse.comsat.webactors.HttpRequest> |
getWebActor(HttpSession session)
Returns the web actor attached to the given
HttpSession. |
static boolean |
isWebActorAttached(HttpSession session)
Checks whether a web actor is attached to an
HttpSession. |
public static <T> ActorRef<T> attachWebActor(HttpSession session, ActorRef<T> actor)
Attaches the given web actor to the given HttpSession.
session - the sessionactor - the web actoractorpublic static boolean isWebActorAttached(HttpSession session)
Checks whether a web actor is attached to an HttpSession.
public static ActorRef<? super co.paralleluniverse.comsat.webactors.HttpRequest> getWebActor(HttpSession session)
Returns the web actor attached to the given HttpSession.
session - the sessionnull if none.public static <T> ActorRef<T> attachWebActor(Session session, HttpSession httpSession, ActorRef<T> actor)
Attaches the given web actor to the given WebSocket session
session - the WebSocket SessionhttpSession - the WebSocket’s associated HTTP sessionactor - the web actoractorpublic static <T> ActorRef<T> attachWebActor(Session session, EndpointConfig config, ActorRef<T> actor)
Attaches the given web actor to the given WebSocket session
session - the WebSocket Sessionconfig - the WebSocket endpoint’s configurationactor - the web actoractorpublic static <T> ActorRef<T> attachWebActor(ServletContext sc, String webSocketURI, ActorRef<T> actor)
Attaches the given web actor to web socket sessions that will be opened at the given URI (or URI pattern). This method installs a new WebSocket Endpoint.
sc - the ServletContextwebSocketURI - the WebSocket’s URI (or URI pattern)actor - the web actoractorpublic static <T> ActorRef<T> attachWebActor(ServletContext sc, Collection<String> webSocketURIs, ActorRef<T> actor)
Attaches the given web actor to web socket sessions that will be opened at the given URIs (or URI patterns). This method installs new WebSocket Endpoints.
sc - the ServletContextwebSocketURIs - the WebSockets’ URI (or URI pattern)actor - the web actoractor