Package pl.morgwai.base.servlet.scopes
Class WebsocketConnectionContext
- java.lang.Object
-
- pl.morgwai.base.guice.scopes.ServerSideContext<WebsocketConnectionContext>
-
- pl.morgwai.base.servlet.scopes.WebsocketConnectionContext
-
public class WebsocketConnectionContext extends pl.morgwai.base.guice.scopes.ServerSideContext<WebsocketConnectionContext>
Context of a websocket connection (Session
).A single instance has its lifetime coupled with a given endpoint instance. Specifically, all calls to given endpoint's annotated methods (from
@OnOpen
, across all calls to@OnMessage
and@OnError
until and including@OnClose
or methods overriding those ofEndpoint
together with methods of registeredMessageHandler
s are executed within a singleWebsocketConnectionContext
.- See Also:
corresponding Scope
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WebsocketConnectionContext(pl.morgwai.base.servlet.scopes.WebsocketConnectionWrapper connection, pl.morgwai.base.guice.scopes.ContextTracker<WebsocketConnectionContext> tracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.websocket.Session
getConnection()
-
-
-
Constructor Detail
-
WebsocketConnectionContext
protected WebsocketConnectionContext(pl.morgwai.base.servlet.scopes.WebsocketConnectionWrapper connection, pl.morgwai.base.guice.scopes.ContextTracker<WebsocketConnectionContext> tracker)
-
-