Class AbstractHttpComponents5MessageSender

java.lang.Object
org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
org.springframework.ws.transport.http.AbstractHttpComponents5MessageSender
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, WebServiceMessageSender
Direct Known Subclasses:
HttpComponents5MessageSender, SimpleHttpComponents5MessageSender

public abstract class AbstractHttpComponents5MessageSender extends AbstractHttpWebServiceMessageSender implements org.springframework.beans.factory.DisposableBean
Base AbstractHttpWebServiceMessageSender implementation that uses Apache HttpClient to execute POST requests.

To configure the underlying HttpClient consider using HttpComponents5MessageSender. To take control on how the HttpClient is built, use SimpleHttpComponents5MessageSender.

Since:
4.1.0
See Also:
  • Constructor Details

    • AbstractHttpComponents5MessageSender

      public AbstractHttpComponents5MessageSender()
  • Method Details

    • getHttpClient

      public abstract org.apache.hc.client5.http.classic.HttpClient getHttpClient()
      Return the HttpClient used by this message sender.
    • 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
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception
    • createContext

      protected @Nullable org.apache.hc.core5.http.protocol.HttpContext createContext(URI uri)
      Template method that allows for creation of an HttpContext for the given uri. Default implementation returns null.
      Parameters:
      uri - the URI to create the context for
      Returns:
      the context, or null