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 Summary
ConstructorsModifierConstructorDescriptionprotectedMailSenderConnection(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 Summary
Modifier and TypeMethodDescriptionvoidaddRequestHeader(String name, String value) jakarta.mail.MessageReturns the request message for this connection.protected OutputStreamgetResponseHeaders(String name) protected InputStreamjakarta.mail.MessageReturns the response message, if any, for this connection.getUri()booleanhasError()protected booleanvoidonClose()protected voidprotected voidonSendAfterWrite(org.springframework.ws.WebServiceMessage message) protected voidonSendBeforeWrite(org.springframework.ws.WebServiceMessage message) Methods inherited from class org.springframework.ws.transport.AbstractSenderConnection
createTransportInputStream, createTransportOutputStreamMethods inherited from class org.springframework.ws.transport.AbstractWebServiceConnection
close, onReceiveAfterRead, receive, send
-
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
- Throws:
URISyntaxException
-
onSendBeforeWrite
protected void onSendBeforeWrite(org.springframework.ws.WebServiceMessage message) throws IOException - Overrides:
onSendBeforeWritein classorg.springframework.ws.transport.AbstractWebServiceConnection- Throws:
IOException
-
addRequestHeader
- Throws:
IOException
-
getRequestOutputStream
- Specified by:
getRequestOutputStreamin classorg.springframework.ws.transport.AbstractSenderConnection- Throws:
IOException
-
onSendAfterWrite
protected void onSendAfterWrite(org.springframework.ws.WebServiceMessage message) throws IOException - Overrides:
onSendAfterWritein classorg.springframework.ws.transport.AbstractWebServiceConnection- Throws:
IOException
-
onReceiveBeforeRead
- Overrides:
onReceiveBeforeReadin classorg.springframework.ws.transport.AbstractWebServiceConnection- Throws:
IOException
-
hasResponse
- Specified by:
hasResponsein classorg.springframework.ws.transport.AbstractSenderConnection- Throws:
IOException
-
getResponseHeaderNames
- Throws:
IOException
-
getResponseHeaders
- Throws:
IOException
-
getResponseInputStream
- Specified by:
getResponseInputStreamin classorg.springframework.ws.transport.AbstractSenderConnection- Throws:
IOException
-
hasError
- Throws:
IOException
-
getErrorMessage
- Throws:
IOException
-
onClose
- Overrides:
onClosein classorg.springframework.ws.transport.AbstractSenderConnection- Throws:
IOException
-