Package io.micronaut.http.client.netty
Class NettyHttpClientFactory
java.lang.Object
io.micronaut.http.client.netty.NettyHttpClientFactory
- All Implemented Interfaces:
HttpClientFactory
,ProxyHttpClientFactory
,RawHttpClientFactory
,SseClientFactory
,StreamingHttpClientFactory
,WebSocketClientFactory
@Internal
public class NettyHttpClientFactory
extends Object
implements HttpClientFactory, SseClientFactory, ProxyHttpClientFactory, StreamingHttpClientFactory, WebSocketClientFactory, RawHttpClientFactory
A factory to create Netty HTTP clients.
- Since:
- 3.0
- Author:
- Sergio del Amo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateClient
(URL url) Create a newHttpClient
.createClient
(URL url, @NonNull HttpClientConfiguration configuration) Create a newHttpClient
with the specified configuration.createProxyClient
(URL url) Create a newProxyHttpClient
.createProxyClient
(URL url, @NonNull HttpClientConfiguration configuration) Create a newProxyHttpClient
with the specified configuration.createRawClient
(@Nullable URI url) Create a newRawHttpClient
.createRawClient
(@Nullable URI url, @NonNull HttpClientConfiguration configuration) Create a newRawHttpClient
with the specified configuration.createSseClient
(@Nullable URL url) Create a newSseClient
.createSseClient
(@Nullable URL url, @NonNull HttpClientConfiguration configuration) Create a newSseClient
with the specified configuration.createStreamingClient
(URL url) Create a newStreamingHttpClient
.createStreamingClient
(URL url, @NonNull HttpClientConfiguration configuration) Create a newStreamingHttpClient
with the specified configuration.createWebSocketClient
(URI uri) Create a newWebSocketClient
.createWebSocketClient
(URI uri, @NonNull HttpClientConfiguration configuration) Create a newWebSocketClient
with the specified configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.websocket.WebSocketClientFactory
createWebSocketClient, createWebSocketClient
-
Constructor Details
-
NettyHttpClientFactory
public NettyHttpClientFactory()
-
-
Method Details
-
createClient
Description copied from interface:HttpClientFactory
Create a newHttpClient
. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Specified by:
createClient
in interfaceHttpClientFactory
- Parameters:
url
- The base URL- Returns:
- The client
-
createClient
@NonNull public @NonNull HttpClient createClient(URL url, @NonNull @NonNull HttpClientConfiguration configuration) Description copied from interface:HttpClientFactory
Create a newHttpClient
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- Specified by:
createClient
in interfaceHttpClientFactory
- Parameters:
url
- The base URLconfiguration
- the client configuration- Returns:
- The client
-
createProxyClient
Description copied from interface:ProxyHttpClientFactory
Create a newProxyHttpClient
. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Specified by:
createProxyClient
in interfaceProxyHttpClientFactory
- Parameters:
url
- The base URL- Returns:
- The client
-
createProxyClient
@NonNull public @NonNull ProxyHttpClient createProxyClient(URL url, @NonNull @NonNull HttpClientConfiguration configuration) Description copied from interface:ProxyHttpClientFactory
Create a newProxyHttpClient
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- Specified by:
createProxyClient
in interfaceProxyHttpClientFactory
- Parameters:
url
- The base URLconfiguration
- the client configuration- Returns:
- The client
-
createSseClient
Description copied from interface:SseClientFactory
Create a newSseClient
. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Specified by:
createSseClient
in interfaceSseClientFactory
- Parameters:
url
- The base URL- Returns:
- The client
-
createSseClient
@NonNull public @NonNull SseClient createSseClient(@Nullable @Nullable URL url, @NonNull @NonNull HttpClientConfiguration configuration) Description copied from interface:SseClientFactory
Create a newSseClient
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- Specified by:
createSseClient
in interfaceSseClientFactory
- Parameters:
url
- The base URLconfiguration
- the client configuration- Returns:
- The client
-
createStreamingClient
Description copied from interface:StreamingHttpClientFactory
Create a newStreamingHttpClient
. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Specified by:
createStreamingClient
in interfaceStreamingHttpClientFactory
- Parameters:
url
- The base URL- Returns:
- The client
-
createStreamingClient
@NonNull public @NonNull StreamingHttpClient createStreamingClient(URL url, @NonNull @NonNull HttpClientConfiguration configuration) Description copied from interface:StreamingHttpClientFactory
Create a newStreamingHttpClient
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- Specified by:
createStreamingClient
in interfaceStreamingHttpClientFactory
- Parameters:
url
- The base URLconfiguration
- The client configuration- Returns:
- The client
-
createWebSocketClient
Description copied from interface:WebSocketClientFactory
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- Specified by:
createWebSocketClient
in interfaceWebSocketClientFactory
- Parameters:
uri
- The base URI- Returns:
- The client
-
createWebSocketClient
@NonNull public @NonNull WebSocketClient createWebSocketClient(URI uri, @NonNull @NonNull HttpClientConfiguration configuration) Description copied from interface:WebSocketClientFactory
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- Specified by:
createWebSocketClient
in interfaceWebSocketClientFactory
- Parameters:
uri
- The base URIconfiguration
- The client configuration- Returns:
- The client
-
createRawClient
Description copied from interface:RawHttpClientFactory
Create a newRawHttpClient
. Note that this method should only be used outside the context of an application. Within Micronaut useInject
to inject a client instead- Specified by:
createRawClient
in interfaceRawHttpClientFactory
- Parameters:
url
- The base URL- Returns:
- The client
-
createRawClient
@NonNull public @NonNull RawHttpClient createRawClient(@Nullable @Nullable URI url, @NonNull @NonNull HttpClientConfiguration configuration) Description copied from interface:RawHttpClientFactory
Create a newRawHttpClient
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- Specified by:
createRawClient
in interfaceRawHttpClientFactory
- Parameters:
url
- The base URLconfiguration
- the client configuration- Returns:
- The client
-