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
  • 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

      public void setConnectionTimeout(@Nullable Duration connectionTimeout)
    • setRequestTimeout

      public void setRequestTimeout(@Nullable Duration requestTimeout)
    • createConnection

      public WebServiceConnection createConnection(URI uri) throws IOException
      Description copied from interface: WebServiceMessageSender
      Create a new WebServiceConnection to the specified URI.
      Specified by:
      createConnection in interface WebServiceMessageSender
      Parameters:
      uri - the URI to open a connection to
      Returns:
      the new connection
      Throws:
      IOException - in case of I/O errors
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception