Interface OpenConnections

All Superinterfaces:
Iterable<WebSocketConnection>
All Known Implementing Classes:
ConnectionManager

@Experimental("This API is experimental and may change in the future") public interface OpenConnections extends Iterable<WebSocketConnection>
Provides convenient access to all open connections.

Quarkus provides a built-in CDI bean with the Singleton scope that implements this interface.

  • Method Details

    • listAll

      default Collection<WebSocketConnection> listAll()
      Returns an immutable snapshot of all open connections at the given time.
      Returns:
      an immutable collection of all open connections
    • findByEndpointId

      default Collection<WebSocketConnection> findByEndpointId(String endpointId)
      Returns an immutable snapshot of all open connections for the given endpoint id.
      Parameters:
      endpointId -
      Returns:
      an immutable collection of all open connections for the given endpoint id
      See Also:
    • findByConnectionId

      default Optional<WebSocketConnection> findByConnectionId(String connectionId)
      Returns the open connection with the given id.
      Parameters:
      connectionId -
      Returns:
      the open connection or empty Optional if no open connection with the given id exists
      See Also:
    • stream

      Returns the stream of all open connections at the given time.
      Returns:
      the stream of open connections