Rename WebClientBuilder.requestFactory(…) to httpConnectorFactory(…)

Closes gh-517
This commit is contained in:
Mark Paluch
2020-01-10 13:13:46 +01:00
parent 1647e763b2
commit f28ab918bc

View File

@@ -117,8 +117,10 @@ public class WebClientBuilder {
*
* @param httpConnector the supplier for the HTTP connector.
* @return {@code this} {@link WebClientBuilder}.
* @since 2.2.1
*/
public WebClientBuilder requestFactory(Supplier<ClientHttpConnector> httpConnector) {
public WebClientBuilder httpConnectorFactory(
Supplier<ClientHttpConnector> httpConnector) {
Assert.notNull(httpConnector, "Supplier of ClientHttpConnector must not be null");
@@ -126,6 +128,20 @@ public class WebClientBuilder {
return this;
}
/**
* Set the {@link Supplier} of {@link ClientHttpConnector} that should be called each
* time we {@link #build()} a new {@link WebClient} instance.
*
* @param httpConnector the supplier for the HTTP connector.
* @return {@code this} {@link WebClientBuilder}.
* @deprecated since 2.2.1 as the name is wrong, use
* {@link #httpConnectorFactory(Supplier)}
*/
@Deprecated
public WebClientBuilder requestFactory(Supplier<ClientHttpConnector> httpConnector) {
return httpConnectorFactory(httpConnector);
}
/**
* Add a default header that will be set if not already present on the outgoing
* {@link HttpRequest}.