Class JmsSenderConnection

java.lang.Object
org.springframework.ws.transport.AbstractWebServiceConnection
org.springframework.ws.transport.AbstractSenderConnection
org.springframework.ws.transport.jms.JmsSenderConnection
All Implemented Interfaces:
AutoCloseable, org.springframework.ws.transport.HeadersAwareSenderWebServiceConnection, org.springframework.ws.transport.WebServiceConnection

public class JmsSenderConnection extends org.springframework.ws.transport.AbstractSenderConnection
Implementation of WebServiceConnection that is used for client-side JMS access. Exposes a BytesMessage request and response message.
Since:
1.5.0
Author:
Arjen Poutsma, Greg Turnquist
  • Constructor Details

    • JmsSenderConnection

      protected JmsSenderConnection(jakarta.jms.ConnectionFactory connectionFactory, jakarta.jms.Connection connection, jakarta.jms.Session session, jakarta.jms.Destination requestDestination, jakarta.jms.Message requestMessage) throws jakarta.jms.JMSException
      Constructs a new JMS connection with the given parameters.
      Throws:
      jakarta.jms.JMSException
  • Method Details

    • getRequestMessage

      public jakarta.jms.Message getRequestMessage()
      Returns the request message for this connection. Returns either a BytesMessage or a TextMessage.
    • getResponseMessage

      public jakarta.jms.Message getResponseMessage()
      Returns the response message, if any, for this connection. Returns either a BytesMessage or a TextMessage.
    • getUri

      public URI getUri() throws URISyntaxException
      Throws:
      URISyntaxException
    • hasError

      public boolean hasError() throws IOException
      Throws:
      IOException
    • getErrorMessage

      public String getErrorMessage() throws IOException
      Throws:
      IOException
    • addRequestHeader

      public void addRequestHeader(String name, String value) throws IOException
      Throws:
      IOException
    • getRequestOutputStream

      protected OutputStream getRequestOutputStream() throws IOException
      Specified by:
      getRequestOutputStream in class org.springframework.ws.transport.AbstractSenderConnection
      Throws:
      IOException
    • onSendAfterWrite

      protected void onSendAfterWrite(org.springframework.ws.WebServiceMessage message) throws IOException
      Overrides:
      onSendAfterWrite in class org.springframework.ws.transport.AbstractWebServiceConnection
      Throws:
      IOException
    • onReceiveBeforeRead

      protected void onReceiveBeforeRead() throws IOException
      Overrides:
      onReceiveBeforeRead in class org.springframework.ws.transport.AbstractWebServiceConnection
      Throws:
      IOException
    • hasResponse

      protected boolean hasResponse() throws IOException
      Specified by:
      hasResponse in class org.springframework.ws.transport.AbstractSenderConnection
      Throws:
      IOException
    • getResponseHeaderNames

      public Iterator<String> getResponseHeaderNames() throws IOException
      Throws:
      IOException
    • getResponseHeaders

      public Iterator<String> getResponseHeaders(String name) throws IOException
      Throws:
      IOException
    • getResponseInputStream

      protected InputStream getResponseInputStream() throws IOException
      Specified by:
      getResponseInputStream in class org.springframework.ws.transport.AbstractSenderConnection
      Throws:
      IOException
    • onClose

      protected void onClose() throws IOException
      Overrides:
      onClose in class org.springframework.ws.transport.AbstractSenderConnection
      Throws:
      IOException