@Factory @Internal public class RxNettyHttpClientRegistry extends java.lang.Object implements java.lang.AutoCloseable, RxHttpClientRegistry
HttpClient interface based on Netty.| Constructor and Description |
|---|
RxNettyHttpClientRegistry(HttpClientConfiguration defaultHttpClientConfiguration,
HttpClientFilterResolver httpClientFilterResolver,
LoadBalancerResolver loadBalancerResolver,
NettyClientSslBuilder nettyClientSslBuilder,
java.util.concurrent.ThreadFactory threadFactory,
MediaTypeCodecRegistry codecRegistry,
EventLoopGroupRegistry eventLoopGroupRegistry,
EventLoopGroupFactory eventLoopGroupFactory,
BeanContext beanContext)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
disposeClient(AnnotationMetadata annotationMetadata)
Dispose of the client defined by the given metadata.
|
DefaultHttpClient |
getClient(AnnotationMetadata metadata)
Return the client for the given annotation metadata.
|
RxHttpClient |
getClient(HttpVersion httpVersion,
java.lang.String clientId,
java.lang.String path)
Return the client for the client ID and path.
|
protected DefaultHttpClient |
httpClient(InjectionPoint<?> injectionPoint,
LoadBalancer loadBalancer,
HttpClientConfiguration configuration,
BeanContext beanContext)
Creates a new
HttpClient for the given injection point. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultClientpublic RxNettyHttpClientRegistry(HttpClientConfiguration defaultHttpClientConfiguration, HttpClientFilterResolver httpClientFilterResolver, LoadBalancerResolver loadBalancerResolver, NettyClientSslBuilder nettyClientSslBuilder, java.util.concurrent.ThreadFactory threadFactory, MediaTypeCodecRegistry codecRegistry, EventLoopGroupRegistry eventLoopGroupRegistry, EventLoopGroupFactory eventLoopGroupFactory, BeanContext beanContext)
defaultHttpClientConfiguration - The default HTTP client configurationhttpClientFilterResolver - The HTTP client filter resolverloadBalancerResolver - The load balancer resolvernettyClientSslBuilder - The client SSL builderthreadFactory - The thread factorycodecRegistry - The codec registryeventLoopGroupRegistry - The event loop group registryeventLoopGroupFactory - The event loop group factorybeanContext - The bean context@NonNull public RxHttpClient getClient(HttpVersion httpVersion, @NonNull java.lang.String clientId, @Nullable java.lang.String path)
RxHttpClientRegistrygetClient in interface RxHttpClientRegistryhttpVersion - The HTTP versionclientId - The client IDpath - The path (Optional)public DefaultHttpClient getClient(AnnotationMetadata metadata)
RxHttpClientRegistrygetClient in interface RxHttpClientRegistrymetadata - The annotation metadata.@PreDestroy public void close()
close in interface java.lang.AutoCloseablepublic void disposeClient(AnnotationMetadata annotationMetadata)
RxHttpClientRegistrydisposeClient in interface RxHttpClientRegistryannotationMetadata - The annotation metadata@Bean @Primary protected DefaultHttpClient httpClient(@Nullable InjectionPoint<?> injectionPoint, @Parameter @Nullable LoadBalancer loadBalancer, @Parameter @Nullable HttpClientConfiguration configuration, BeanContext beanContext)
HttpClient for the given injection point.injectionPoint - The injection pointloadBalancer - The load balancer to use (Optional)configuration - The configuration (Optional)beanContext - The bean context to use