Module com.rabbitmq.http.client
Package com.rabbitmq.http.client
Class JdkHttpClientHttpLayer.Configuration
- java.lang.Object
-
- com.rabbitmq.http.client.JdkHttpClientHttpLayer.Configuration
-
- Enclosing class:
- JdkHttpClientHttpLayer
public static class JdkHttpClientHttpLayer.Configuration extends Object
Class to configure the defaultHttpLayer
implementation.- See Also:
JdkHttpClientHttpLayer
-
-
Constructor Summary
Constructors Constructor Description Configuration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JdkHttpClientHttpLayer.Configuration
clientBuilderConsumer(Consumer<HttpClient.Builder> clientBuilderConsumer)
Callback to configure theHttpClient.Builder
.HttpLayer.HttpLayerFactory
create()
JdkHttpClientHttpLayer.Configuration
requestBuilderConsumer(Consumer<HttpRequest.Builder> requestBuilderConsumer)
Callback to configure theHttpRequest.Builder
.
-
-
-
Method Detail
-
clientBuilderConsumer
public JdkHttpClientHttpLayer.Configuration clientBuilderConsumer(Consumer<HttpClient.Builder> clientBuilderConsumer)
Callback to configure theHttpClient.Builder
.The client can be configured to use TLS with this callback. Use the
HttpClient.Builder.sslContext(SSLContext)
andHttpClient.Builder.sslParameters(SSLParameters)
methods to configure TLS appropriately.Use the
SSLParameters.setEndpointIdentificationAlgorithm(String)
method with theHTTPS
value to enable server hostname verification.- Parameters:
clientBuilderConsumer
-- Returns:
- this configuration instance
-
requestBuilderConsumer
public JdkHttpClientHttpLayer.Configuration requestBuilderConsumer(Consumer<HttpRequest.Builder> requestBuilderConsumer)
Callback to configure theHttpRequest.Builder
.- Parameters:
requestBuilderConsumer
-- Returns:
- the configuration instance
-
create
public HttpLayer.HttpLayerFactory create()
-
-