Class JdkHttpClientMessageSender
java.lang.Object
org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
org.springframework.ws.transport.http.JdkHttpClientMessageSender
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,WebServiceMessageSender
public class JdkHttpClientMessageSender
extends AbstractHttpWebServiceMessageSender
implements org.springframework.beans.factory.InitializingBean
WebServiceMessageSender implementation that uses the standard Java HttpClient facilities to execute
POST requests.
Can be used with a simple default configured HttpClient or can be constructed with a pre-configured
HttpClient.
- Since:
- 4.0
- Author:
- Marten Deinum
- See Also:
-
HttpClient
-
Field Summary
Fields inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateConnection(URI uri) Create a newWebServiceConnectionto the specified URI.voidsetConnectionTimeout(Duration connectionTimeout) voidsetHttpClient(java.net.http.HttpClient httpClient) voidsetRequestTimeout(Duration requestTimeout) Methods inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
isAcceptGzipEncoding, setAcceptGzipEncoding, supports
-
Constructor Details
-
JdkHttpClientMessageSender
public JdkHttpClientMessageSender() -
JdkHttpClientMessageSender
public JdkHttpClientMessageSender(java.net.http.HttpClient httpClient)
-
-
Method Details
-
setHttpClient
public void setHttpClient(@Nullable java.net.http.HttpClient httpClient) -
setConnectionTimeout
-
setRequestTimeout
-
createConnection
Description copied from interface:WebServiceMessageSenderCreate a newWebServiceConnectionto the specified URI.- Specified by:
createConnectionin interfaceWebServiceMessageSender- Parameters:
uri- the URI to open a connection to- Returns:
- the new connection
- Throws:
IOException- in case of I/O errors
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-