public class SimpleWebSocketConnectionRegistry extends Object implements IWebSocketConnectionRegistry
Constructor and Description |
---|
SimpleWebSocketConnectionRegistry() |
Modifier and Type | Method and Description |
---|---|
IWebSocketConnection |
getConnection(Application application,
String sessionId,
IKey key) |
Collection<IWebSocketConnection> |
getConnections(Application application)
Returns a collection of currently active websockets.
|
Collection<IWebSocketConnection> |
getConnections(Application application,
String sessionId) |
void |
removeConnection(Application application,
String sessionId,
IKey key)
Removes a web socket connection from the registry at the specified coordinates (application+session+page)
|
void |
setConnection(Application application,
String sessionId,
IKey key,
IWebSocketConnection connection)
Adds a new connection into the registry at the specified coordinates (application+session+page)
|
public IWebSocketConnection getConnection(Application application, String sessionId, IKey key)
getConnection
in interface IWebSocketConnectionRegistry
application
- the web application to look insessionId
- the http session idkey
- the web socket client keypublic Collection<IWebSocketConnection> getConnections(Application application, String sessionId)
getConnections
in interface IWebSocketConnectionRegistry
application
- the web application to look insessionId
- the http session idpublic Collection<IWebSocketConnection> getConnections(Application application)
getConnections
in interface IWebSocketConnectionRegistry
application
- The applicationpublic void setConnection(Application application, String sessionId, IKey key, IWebSocketConnection connection)
IWebSocketConnectionRegistry
setConnection
in interface IWebSocketConnectionRegistry
application
- the web application to look insessionId
- the http session idkey
- the web socket client keyconnection
- the web socket connection to addpublic void removeConnection(Application application, String sessionId, IKey key)
IWebSocketConnectionRegistry
removeConnection
in interface IWebSocketConnectionRegistry
application
- the web application to look insessionId
- the http session idkey
- the web socket client keyCopyright © 2006–2022 Apache Software Foundation. All rights reserved.