Class MailSenderConnection

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

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

    • MailSenderConnection

      protected MailSenderConnection(jakarta.mail.Session session, jakarta.mail.URLName transportUri, jakarta.mail.URLName storeUri, jakarta.mail.internet.InternetAddress to, long receiveTimeout)
      Constructs a new Mail connection with the given parameters.
  • Method Details

    • getRequestMessage

      public jakarta.mail.Message getRequestMessage()
      Returns the request message for this connection.
    • getResponseMessage

      public jakarta.mail.Message getResponseMessage()
      Returns the response message, if any, for this connection.
    • getUri

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

      protected void onSendBeforeWrite(org.springframework.ws.WebServiceMessage message) throws IOException
      Overrides:
      onSendBeforeWrite in class org.springframework.ws.transport.AbstractWebServiceConnection
      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
    • hasError

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

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

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