Class HttpComponents5MessageSender
java.lang.Object
org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
org.springframework.ws.transport.http.AbstractHttpComponents5MessageSender
org.springframework.ws.transport.http.HttpComponents5MessageSender
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, WebServiceMessageSender
public class HttpComponents5MessageSender
extends AbstractHttpComponents5MessageSender
implements org.springframework.beans.factory.InitializingBean
AbstractHttpComponents5MessageSender implementation that configures the
underlying Apache HttpClient
that executes POST requests.
To specify the HttpClient, consider using
SimpleHttpComponents5MessageSender instead.
- Since:
- 4.0.5
- See Also:
-
Field Summary
Fields inherited from class AbstractHttpWebServiceMessageSender
logger -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance of theHttpClientMessageSenderwith a defaultHttpClientthat uses a defaultPoolingHttpClientConnectionManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.apache.hc.client5.http.classic.HttpClientReturn theHttpClientused by this message sender.voidsetAuthScope(org.apache.hc.client5.http.auth.AuthScope authScope) Set the authentication scope to be used.voidsetConnectionTimeout(Duration timeout) Set the timeout until a connection is established.voidsetCredentials(org.apache.hc.client5.http.auth.Credentials credentials) Set the credentials to be used.voidsetMaxConnectionsPerHost(Map<String, String> maxConnectionsPerHost) Sets the maximum number of connections per host for the underlying HttpClient.voidsetMaxTotalConnections(int maxTotalConnections) Sets the maximum number of connections allowed for the underlying HttpClient.voidsetReadTimeout(Duration timeout) Set the socket read timeout for the underlying HttpClient.Methods inherited from class AbstractHttpComponents5MessageSender
createConnection, createContext, destroyMethods inherited from class AbstractHttpWebServiceMessageSender
isAcceptGzipEncoding, setAcceptGzipEncoding, supports
-
Constructor Details
-
HttpComponents5MessageSender
public HttpComponents5MessageSender()Create a new instance of theHttpClientMessageSenderwith a defaultHttpClientthat uses a defaultPoolingHttpClientConnectionManager.
-
-
Method Details
-
getHttpClient
public org.apache.hc.client5.http.classic.HttpClient getHttpClient()Description copied from class:AbstractHttpComponents5MessageSenderReturn theHttpClientused by this message sender.- Specified by:
getHttpClientin classAbstractHttpComponents5MessageSender
-
setAuthScope
public void setAuthScope(org.apache.hc.client5.http.auth.AuthScope authScope) Set the authentication scope to be used. Only used when thecredentialsproperty has been set.- See Also:
-
setCredentials
public void setCredentials(org.apache.hc.client5.http.auth.Credentials credentials) Set the credentials to be used. If not set, no authentication is done.- See Also:
-
setConnectionTimeout
Set the timeout until a connection is established.- See Also:
-
setReadTimeout
Set the socket read timeout for the underlying HttpClient.- See Also:
-
setMaxTotalConnections
public void setMaxTotalConnections(int maxTotalConnections) Sets the maximum number of connections allowed for the underlying HttpClient.- See Also:
-
setMaxConnectionsPerHost
-
afterPropertiesSet
-