org.apache.wicket.protocol.ws.api
Class SimpleWebSocketConnectionRegistry
java.lang.Object
org.apache.wicket.protocol.ws.api.SimpleWebSocketConnectionRegistry
- All Implemented Interfaces:
- IWebSocketConnectionRegistry
public class SimpleWebSocketConnectionRegistry
- extends Object
- implements IWebSocketConnectionRegistry
A registry that keeps all currently opened web socket connections in
maps in Application's meta data.
TODO remove the synchronizations below and use ConcurrentMap#putIfAbsent()
- Since:
- 6.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleWebSocketConnectionRegistry
public SimpleWebSocketConnectionRegistry()
getConnection
public IWebSocketConnection getConnection(Application application,
String sessionId,
Integer pageId)
- Specified by:
getConnection in interface IWebSocketConnectionRegistry
- Parameters:
application - the web application to look insessionId - the web socket client session idpageId - the web socket client page id
- Returns:
- the web socket connection used by a client from the specified coordinates
setConnection
public void setConnection(Application application,
String sessionId,
Integer pageId,
IWebSocketConnection connection)
- Description copied from interface:
IWebSocketConnectionRegistry
- Adds a new connection into the registry at the specified coordinates (application+session+page)
- Specified by:
setConnection in interface IWebSocketConnectionRegistry
- Parameters:
application - the web application to look insessionId - the web socket client session idpageId - the web socket client page idconnection - the web socket connection to add
removeConnection
public void removeConnection(Application application,
String sessionId,
Integer pageId)
- Description copied from interface:
IWebSocketConnectionRegistry
- Removes a web socket connection from the registry at the specified coordinates (application+session+page)
- Specified by:
removeConnection in interface IWebSocketConnectionRegistry
- Parameters:
application - the web application to look insessionId - the web socket client session idpageId - the web socket client page id
Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.