19
19
import java .time .Duration ;
20
20
import java .util .List ;
21
21
import java .util .Optional ;
22
- import java .util .function .Function ;
23
22
import java .util .function .Supplier ;
24
23
25
24
import javax .net .ssl .HostnameVerifier ;
28
27
import org .elasticsearch .client .RestClientBuilder .HttpClientConfigCallback ;
29
28
import org .springframework .data .elasticsearch .support .HttpHeaders ;
30
29
import org .springframework .lang .Nullable ;
31
- import org .springframework .web .reactive .function .client .WebClient ;
32
30
33
31
/**
34
32
* Default {@link ClientConfiguration} implementation.
@@ -50,16 +48,15 @@ class DefaultClientConfiguration implements ClientConfiguration {
50
48
private final @ Nullable String pathPrefix ;
51
49
private final @ Nullable HostnameVerifier hostnameVerifier ;
52
50
private final @ Nullable String proxy ;
53
- private final Function <WebClient , WebClient > webClientConfigurer ;
54
51
private final HttpClientConfigCallback httpClientConfigurer ;
55
52
private final Supplier <HttpHeaders > headersSupplier ;
56
53
private final List <ClientConfigurationCallback <?>> clientConfigurers ;
57
54
58
55
DefaultClientConfiguration (List <InetSocketAddress > hosts , HttpHeaders headers , boolean useSsl ,
59
56
@ Nullable SSLContext sslContext , Duration soTimeout , Duration connectTimeout , @ Nullable String pathPrefix ,
60
57
@ Nullable HostnameVerifier hostnameVerifier , @ Nullable String proxy ,
61
- Function < WebClient , WebClient > webClientConfigurer , HttpClientConfigCallback httpClientConfigurer ,
62
- List < ClientConfigurationCallback <?>> clientConfigurers , Supplier <HttpHeaders > headersSupplier ) {
58
+ HttpClientConfigCallback httpClientConfigurer , List < ClientConfigurationCallback <?>> clientConfigurers ,
59
+ Supplier <HttpHeaders > headersSupplier ) {
63
60
64
61
this .hosts = List .copyOf (hosts );
65
62
this .headers = headers ;
@@ -70,7 +67,6 @@ class DefaultClientConfiguration implements ClientConfiguration {
70
67
this .pathPrefix = pathPrefix ;
71
68
this .hostnameVerifier = hostnameVerifier ;
72
69
this .proxy = proxy ;
73
- this .webClientConfigurer = webClientConfigurer ;
74
70
this .httpClientConfigurer = httpClientConfigurer ;
75
71
this .clientConfigurers = clientConfigurers ;
76
72
this .headersSupplier = headersSupplier ;
@@ -122,11 +118,6 @@ public Optional<String> getProxy() {
122
118
return Optional .ofNullable (proxy );
123
119
}
124
120
125
- @ Override
126
- public Function <WebClient , WebClient > getWebClientConfigurer () {
127
- return webClientConfigurer ;
128
- }
129
-
130
121
@ Override
131
122
public <T > List <ClientConfigurationCallback <?>> getClientConfigurers () {
132
123
return clientConfigurers ;
0 commit comments