Interface HttpClientRegistry<T extends HttpClient>

Type Parameters:
T - Reactive HTTP Client
All Known Implementing Classes:
DefaultJdkHttpClientRegistry, DefaultNettyHttpClientRegistry

public interface HttpClientRegistry<T extends HttpClient>
Interface for managing the construction and lifecycle of instances of HttpClient clients.
Since:
3.0.0
Author:
Sergio del Amo
  • Method Details

    • getClient

      @NonNull T getClient(@NonNull AnnotationMetadata annotationMetadata)
      Return the client for the given annotation metadata.
      Parameters:
      annotationMetadata - The annotation metadata.
      Returns:
      The client
    • getClient

      @Deprecated default @NonNull T getClient(HttpVersion httpVersion, @NonNull String clientId, @Nullable String path)
      Return the client for the client ID and path.
      Parameters:
      httpVersion - The HTTP version
      clientId - The client ID
      path - The path (Optional)
      Returns:
      The client
    • getClient

      @NonNull T getClient(@NonNull HttpVersionSelection httpVersion, @NonNull String clientId, @Nullable String path)
      Return the client for the client ID and path.
      Parameters:
      httpVersion - The HTTP version
      clientId - The client ID
      path - The path (Optional)
      Returns:
      The client
      Since:
      4.0.0
    • resolveClient

      @NonNull T resolveClient(@Nullable InjectionPoint<?> injectionPoint, @Nullable LoadBalancer loadBalancer, @Nullable HttpClientConfiguration configuration, @NonNull BeanContext beanContext)
      Resolves a HttpClient for the given injection point.
      Parameters:
      injectionPoint - The injection point
      loadBalancer - The load balancer to use (Optional)
      configuration - The configuration (Optional)
      beanContext - The bean context to use
      Returns:
      The HTTP Client
    • disposeClient

      void disposeClient(AnnotationMetadata annotationMetadata)
      Dispose of the client defined by the given metadata.
      Parameters:
      annotationMetadata - The annotation metadata
    • getDefaultClient

      default T getDefaultClient()
      Returns:
      Return the default HTTP client.