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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createConnection
(URI uri) Create a newWebServiceConnection
to the specified URI.void
setConnectionTimeout
(Duration connectionTimeout) void
setHttpClient
(java.net.http.HttpClient httpClient) void
setRequestTimeout
(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:WebServiceMessageSender
Create a newWebServiceConnection
to the specified URI.- Specified by:
createConnection
in 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:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-