Package io.quarkus.websockets.next
Interface OpenClientConnections
- All Superinterfaces:
Iterable<WebSocketClientConnection>
- All Known Implementing Classes:
ClientConnectionManager
@Experimental("This API is experimental and may change in the future")
public interface OpenClientConnections
extends Iterable<WebSocketClientConnection>
Provides convenient access to all open client connections.
Quarkus provides a built-in CDI bean with the Singleton scope that implements this interface.
-
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
-