Class ClientHttpRequestFactories

java.lang.Object
org.springframework.boot.web.client.ClientHttpRequestFactories

@Deprecated(since="3.4.0", forRemoval=true) public final class ClientHttpRequestFactories extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
since 3.4.0 for removal in 3.6.0 in favor of ClientHttpRequestFactoryBuilder
Utility class that can be used to create ClientHttpRequestFactory instances configured using given ClientHttpRequestFactorySettings.
Since:
3.0.0
  • Method Details

    • get

      public static org.springframework.http.client.ClientHttpRequestFactory get(ClientHttpRequestFactorySettings settings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return a ClientHttpRequestFactory implementation with the given settings applied. The first of the following implementations whose dependencies are available is returned:
      1. HttpComponentsClientHttpRequestFactory
      2. JettyClientHttpRequestFactory
      3. ReactorClientHttpRequestFactory
      4. SimpleClientHttpRequestFactory
      Parameters:
      settings - the settings to apply
      Returns:
      a new ClientHttpRequestFactory
    • get

      public static <T extends org.springframework.http.client.ClientHttpRequestFactory> T get(Class<T> requestFactoryType, ClientHttpRequestFactorySettings settings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return a new ClientHttpRequestFactory of the given requestFactoryType, applying ClientHttpRequestFactorySettings using reflection if necessary. The following implementations are supported without the use of reflection:
      • HttpComponentsClientHttpRequestFactory
      • JdkClientHttpRequestFactory
      • JettyClientHttpRequestFactory
      • ReactorClientHttpRequestFactory
      • SimpleClientHttpRequestFactory
      A requestFactoryType of ClientHttpRequestFactory is equivalent to calling get(ClientHttpRequestFactorySettings).
      Type Parameters:
      T - the ClientHttpRequestFactory type
      Parameters:
      requestFactoryType - the ClientHttpRequestFactory type
      settings - the settings to apply
      Returns:
      a new ClientHttpRequestFactory instance
    • get

      public static <T extends org.springframework.http.client.ClientHttpRequestFactory> T get(Supplier<T> requestFactorySupplier, ClientHttpRequestFactorySettings settings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return a new ClientHttpRequestFactory from the given supplier, applying ClientHttpRequestFactorySettings using reflection.
      Type Parameters:
      T - the ClientHttpRequestFactory type
      Parameters:
      requestFactorySupplier - the ClientHttpRequestFactory supplier
      settings - the settings to apply
      Returns:
      a new ClientHttpRequestFactory instance