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:
-
HttpClient
-
Field Summary
Fields inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
logger
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance of theHttpClientMessageSender
with a defaultHttpClient
that uses a defaultPoolingHttpClientConnectionManager
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
org.apache.hc.client5.http.classic.HttpClient
Return theHttpClient
used by this message sender.void
setAuthScope
(org.apache.hc.client5.http.auth.AuthScope authScope) Set the authentication scope to be used.void
setConnectionTimeout
(Duration timeout) Set the timeout until a connection is established.void
setCredentials
(org.apache.hc.client5.http.auth.Credentials credentials) Set the credentials to be used.void
setMaxConnectionsPerHost
(Map<String, String> maxConnectionsPerHost) Sets the maximum number of connections per host for the underlying HttpClient.void
setMaxTotalConnections
(int maxTotalConnections) Sets the maximum number of connections allowed for the underlying HttpClient.void
setReadTimeout
(Duration timeout) Set the socket read timeout for the underlying HttpClient.Methods inherited from class org.springframework.ws.transport.http.AbstractHttpComponents5MessageSender
createConnection, createContext, destroy
Methods inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
isAcceptGzipEncoding, setAcceptGzipEncoding, supports
-
Constructor Details
-
HttpComponents5MessageSender
public HttpComponents5MessageSender()Create a new instance of theHttpClientMessageSender
with a defaultHttpClient
that uses a defaultPoolingHttpClientConnectionManager
.
-
-
Method Details
-
getHttpClient
public org.apache.hc.client5.http.classic.HttpClient getHttpClient()Description copied from class:AbstractHttpComponents5MessageSender
Return theHttpClient
used by this message sender.- Specified by:
getHttpClient
in classAbstractHttpComponents5MessageSender
-
setAuthScope
public void setAuthScope(org.apache.hc.client5.http.auth.AuthScope authScope) Set the authentication scope to be used. Only used when thecredentials
property has been set. -
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. -
setConnectionTimeout
Set the timeout until a connection is established. -
setReadTimeout
Set the socket read timeout for the underlying HttpClient. -
setMaxTotalConnections
public void setMaxTotalConnections(int maxTotalConnections) Sets the maximum number of connections allowed for the underlying HttpClient. -
setMaxConnectionsPerHost
Sets the maximum number of connections per host for the underlying HttpClient. -
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-