Interface IWebSocketConnectionRegistry

  • All Known Implementing Classes:
    SimpleWebSocketConnectionRegistry

    public interface IWebSocketConnectionRegistry
    Tracks all currently connected WebSocket clients
    Since:
    6.0
    • Method Detail

      • getConnection

        IWebSocketConnection getConnection​(org.apache.wicket.Application application,
                                           java.lang.String sessionId,
                                           IKey key)
        Parameters:
        application - the web application to look in
        sessionId - the http session id
        key - the web socket client key
        Returns:
        the web socket connection used by a client from the specified coordinates
      • getConnections

        java.util.Collection<IWebSocketConnection> getConnections​(org.apache.wicket.Application application,
                                                                  java.lang.String sessionId)
        Parameters:
        application - the web application to look in
        sessionId - the http session id
        Returns:
        collection of web socket connection used by a client with the given session id
      • getConnections

        java.util.Collection<IWebSocketConnection> getConnections​(org.apache.wicket.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​(org.apache.wicket.Application application,
                           java.lang.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 in
        sessionId - the http session id
        key - the web socket client key
        connection - the web socket connection to add
      • removeConnection

        void removeConnection​(org.apache.wicket.Application application,
                              java.lang.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 in
        sessionId - the http session id
        key - the web socket client key