Interface IWebSocketConnectionRegistry
-
- All Known Implementing Classes:
SimpleWebSocketConnectionRegistry
public interface IWebSocketConnectionRegistry
Tracks all currently connected WebSocket clients- Since:
- 6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IWebSocketConnectionRegistry.IConnectionsFilter
Interface allowing to filter web-sockets connections.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IWebSocketConnection
getConnection(Application application, String sessionId, IKey key)
Collection<IWebSocketConnection>
getConnections(Application application)
Collection<IWebSocketConnection>
getConnections(Application application, String sessionId)
Collection<IWebSocketConnection>
getConnections(Application application, IWebSocketConnectionRegistry.IConnectionsFilter connectionsFilter)
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)
-
-
-
Method Detail
-
getConnection
IWebSocketConnection getConnection(Application application, String sessionId, IKey key)
- Parameters:
application
- the web application to look insessionId
- the http session idkey
- the web socket client key- Returns:
- the web socket connection used by a client from the specified coordinates
-
getConnections
Collection<IWebSocketConnection> getConnections(Application application, String sessionId)
- Parameters:
application
- the web application to look insessionId
- the http session id- Returns:
- collection of web socket connections used by a client with the given session id
-
getConnections
Collection<IWebSocketConnection> getConnections(Application application, IWebSocketConnectionRegistry.IConnectionsFilter connectionsFilter)
- Parameters:
application
- the web application to look inconnectionsFilter
- theIWebSocketConnectionRegistry.IConnectionsFilter
- Returns:
- collection of web socket connections that match certain filter
-
getConnections
Collection<IWebSocketConnection> getConnections(Application application)
- Parameters:
application
- the web application to look in- Returns:
- collection of web socket connection used by any client connected to specified application
-
setConnection
void setConnection(Application application, String sessionId, IKey key, IWebSocketConnection connection)
Adds a new connection into the registry at the specified coordinates (application+session+page)- Parameters:
application
- the web application to look insessionId
- the http session idkey
- the web socket client keyconnection
- the web socket connection to add
-
removeConnection
void removeConnection(Application application, String sessionId, IKey key)
Removes a web socket connection from the registry at the specified coordinates (application+session+page)- Parameters:
application
- the web application to look insessionId
- the http session idkey
- the web socket client key
-
-