Package io.micronaut.websocket
Interface WebSocketClientFactory
- All Known Implementing Classes:
NettyHttpClientFactory
public interface WebSocketClientFactory
A factory to create WebSocket clients.
- Since:
- 3.0.0
- Author:
- James Kleeh, Sergio del Amo
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull WebSocketClient
Create a newWebSocketClient
.default @NonNull WebSocketClient
createWebSocketClient
(@Nullable URI uri, @NonNull HttpClientConfiguration configuration) Create a newWebSocketClient
with the specified configuration.default @NonNull WebSocketClient
Deprecated.default @NonNull WebSocketClient
createWebSocketClient
(@Nullable URL url, @NonNull HttpClientConfiguration configuration) Deprecated.
-
Method Details
-
createWebSocketClient
@NonNull @Deprecated default @NonNull WebSocketClient createWebSocketClient(@Nullable @Nullable URL url) Deprecated.UsecreateWebSocketClient(URI)
insteadCreate a newWebSocketClient
. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Parameters:
url
- The base URL- Returns:
- The client
-
createWebSocketClient
@NonNull @Deprecated default @NonNull WebSocketClient createWebSocketClient(@Nullable @Nullable URL url, @NonNull @NonNull HttpClientConfiguration configuration) Deprecated.Create a newWebSocketClient
with the specified configuration. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Parameters:
url
- The base URLconfiguration
- The client configuration- Returns:
- The client
-
createWebSocketClient
Create a newWebSocketClient
. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Parameters:
uri
- The base URI- Returns:
- The client
- Since:
- 3.2.0
-
createWebSocketClient
@NonNull default @NonNull WebSocketClient createWebSocketClient(@Nullable @Nullable URI uri, @NonNull @NonNull HttpClientConfiguration configuration) Create a newWebSocketClient
with the specified configuration. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Parameters:
uri
- The base URIconfiguration
- The client configuration- Returns:
- The client
- Since:
- 3.2.0
-
createWebSocketClient(URI)
instead