Package io.quarkus.websockets.next
Interface OpenConnections
- All Superinterfaces:
Iterable<WebSocketConnection>
- All Known Implementing Classes:
ConnectionManager
Provides convenient access to all open connections.
Quarkus provides a CDI bean with bean type OpenConnections and qualifier Default.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<WebSocketConnection> findByConnectionId(String connectionId) Returns the open connection with the given id.default Collection<WebSocketConnection> findByEndpointId(String endpointId) Returns an immutable snapshot of all open connections for the given endpoint id.default Collection<WebSocketConnection> 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
-
findByEndpointId
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
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<WebSocketConnection> stream()Returns the stream of all open connections at the given time.- Returns:
- the stream of open connections
-