Package io.quarkus.websockets.next
Interface OpenClientConnections
- All Superinterfaces:
Iterable<WebSocketClientConnection>
- All Known Implementing Classes:
ClientConnectionManager
Provides convenient access to all open client connections.
Quarkus provides a CDI bean with bean type OpenClientConnections and qualifier Default.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<WebSocketClientConnection> findByClientId(String clientId) Returns an immutable snapshot of all open connections for the given client id.default Optional<WebSocketClientConnection> findByConnectionId(String connectionId) Returns the open connection with the given id.default Collection<WebSocketClientConnection> listAll()Returns an immutable snapshot of all open connections at the given time.stream()Returns the stream of all open connections at the given time.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
listAll
Returns an immutable snapshot of all open connections at the given time.- Returns:
- an immutable collection of all open connections
-
findByClientId
Returns an immutable snapshot of all open connections for the given client id.- Parameters:
endpointId-- Returns:
- an immutable collection of all open connections for the given client id
- See Also:
-
findByConnectionId
Returns the open connection with the given id.- Parameters:
connectionId-- Returns:
- the open connection or empty
Optionalif no open connection with the given id exists - See Also:
-
stream
Stream<WebSocketClientConnection> stream()Returns the stream of all open connections at the given time.- Returns:
- the stream of open connections
-