public interface WebSocketClient extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close() |
<T extends AutoCloseable> |
connect(Class<T> clientEndpointType,
Map<String,Object> parameters)
Connect the given client endpoint type.
|
<T extends AutoCloseable> |
connect(Class<T> clientEndpointType,
MutableHttpRequest<?> request)
Connect the given client endpoint type to the URI over WebSocket.
|
default <T extends AutoCloseable> |
connect(Class<T> clientEndpointType,
String uri)
Connect the given client endpoint type to the URI over WebSocket.
|
default <T extends AutoCloseable> |
connect(Class<T> clientEndpointType,
URI uri)
Connect the given client endpoint type to the URI over WebSocket.
|
<T extends AutoCloseable> Publisher<T> connect(Class<T> clientEndpointType, MutableHttpRequest<?> request)
T
- The generic typeclientEndpointType
- The endpoint type. Should be a class annotated with ClientWebSocket
request
- The original request to establish the connectionPublisher
that emits the ClientWebSocket
instance<T extends AutoCloseable> Publisher<T> connect(Class<T> clientEndpointType, Map<String,Object> parameters)
connect(Class, URI)
this method will the value declared within the ClientWebSocket
as the URI
and expand the URI with the given parameters.T
- The generic typeclientEndpointType
- The endpoint type. Should be a class annotated with ClientWebSocket
parameters
- The URI parameters for the endpointPublisher
that emits the ClientWebSocket
instancevoid close()
close
in interface AutoCloseable
default <T extends AutoCloseable> Publisher<T> connect(Class<T> clientEndpointType, String uri)
T
- The generic typeclientEndpointType
- The endpoint type. Should be a class annotated with ClientWebSocket
uri
- The URI to connect overPublisher
that emits the ClientWebSocket
instancedefault <T extends AutoCloseable> Publisher<T> connect(Class<T> clientEndpointType, URI uri)
T
- The generic typeclientEndpointType
- The endpoint type. Should be a class annotated with ClientWebSocket
uri
- The URI to connect overPublisher
that emits the ClientWebSocket
instance