public class MailSenderConnection extends AbstractSenderConnection
WebServiceConnection that is used for client-side Mail access. Exposes a Message
request and response message.| Modifier | Constructor and Description |
|---|---|
protected |
MailSenderConnection(javax.mail.Session session,
javax.mail.URLName transportUri,
javax.mail.URLName storeUri,
javax.mail.internet.InternetAddress to,
long receiveTimeout)
Constructs a new Mail connection with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRequestHeader(String name,
String value) |
String |
getErrorMessage() |
javax.mail.Message |
getRequestMessage()
Returns the request message for this connection.
|
protected OutputStream |
getRequestOutputStream() |
Iterator<String> |
getResponseHeaderNames() |
Iterator<String> |
getResponseHeaders(String name) |
protected InputStream |
getResponseInputStream() |
javax.mail.Message |
getResponseMessage()
Returns the response message, if any, for this connection.
|
URI |
getUri() |
boolean |
hasError() |
protected boolean |
hasResponse() |
void |
onClose() |
protected void |
onReceiveBeforeRead() |
protected void |
onSendAfterWrite(WebServiceMessage message) |
protected void |
onSendBeforeWrite(WebServiceMessage message) |
createTransportInputStream, createTransportOutputStreamclose, onReceiveAfterRead, receive, sendprotected MailSenderConnection(javax.mail.Session session,
javax.mail.URLName transportUri,
javax.mail.URLName storeUri,
javax.mail.internet.InternetAddress to,
long receiveTimeout)
public javax.mail.Message getRequestMessage()
public javax.mail.Message getResponseMessage()
public URI getUri() throws URISyntaxException
URISyntaxExceptionprotected void onSendBeforeWrite(WebServiceMessage message) throws IOException
onSendBeforeWrite in class AbstractWebServiceConnectionIOExceptionpublic void addRequestHeader(String name, String value) throws IOException
IOExceptionprotected OutputStream getRequestOutputStream() throws IOException
getRequestOutputStream in class AbstractSenderConnectionIOExceptionprotected void onSendAfterWrite(WebServiceMessage message) throws IOException
onSendAfterWrite in class AbstractWebServiceConnectionIOExceptionprotected void onReceiveBeforeRead()
throws IOException
onReceiveBeforeRead in class AbstractWebServiceConnectionIOExceptionprotected boolean hasResponse()
throws IOException
hasResponse in class AbstractSenderConnectionIOExceptionpublic Iterator<String> getResponseHeaderNames() throws IOException
IOExceptionpublic Iterator<String> getResponseHeaders(String name) throws IOException
IOExceptionprotected InputStream getResponseInputStream() throws IOException
getResponseInputStream in class AbstractSenderConnectionIOExceptionpublic boolean hasError()
throws IOException
IOExceptionpublic String getErrorMessage() throws IOException
IOExceptionpublic void onClose()
throws IOException
onClose in class AbstractSenderConnectionIOExceptionCopyright © 2022 Pivotal Software. All rights reserved.