org.springframework.ws.transport.mail
Class MailSenderConnection

java.lang.Object
  extended by org.springframework.ws.transport.AbstractWebServiceConnection
      extended by org.springframework.ws.transport.AbstractSenderConnection
          extended by org.springframework.ws.transport.mail.MailSenderConnection
All Implemented Interfaces:
WebServiceConnection

public class MailSenderConnection
extends 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

Constructor Summary
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.
 
Method Summary
protected  void addRequestHeader(String name, String value)
           
 String getErrorMessage()
           
 javax.mail.Message getRequestMessage()
          Returns the request message for this connection.
protected  OutputStream getRequestOutputStream()
           
protected  Iterator<String> getResponseHeaderNames()
           
protected  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)
           
 
Methods inherited from class org.springframework.ws.transport.AbstractSenderConnection
createTransportInputStream, createTransportOutputStream
 
Methods inherited from class org.springframework.ws.transport.AbstractWebServiceConnection
close, onReceiveAfterRead, receive, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailSenderConnection

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.

Method Detail

getRequestMessage

public javax.mail.Message getRequestMessage()
Returns the request message for this connection.


getResponseMessage

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


getUri

public URI getUri()
           throws URISyntaxException
Throws:
URISyntaxException

onSendBeforeWrite

protected void onSendBeforeWrite(WebServiceMessage message)
                          throws IOException
Overrides:
onSendBeforeWrite in class AbstractWebServiceConnection
Throws:
IOException

addRequestHeader

protected void addRequestHeader(String name,
                                String value)
                         throws IOException
Specified by:
addRequestHeader in class AbstractSenderConnection
Throws:
IOException

getRequestOutputStream

protected OutputStream getRequestOutputStream()
                                       throws IOException
Specified by:
getRequestOutputStream in class AbstractSenderConnection
Throws:
IOException

onSendAfterWrite

protected void onSendAfterWrite(WebServiceMessage message)
                         throws IOException
Overrides:
onSendAfterWrite in class AbstractWebServiceConnection
Throws:
IOException

onReceiveBeforeRead

protected void onReceiveBeforeRead()
                            throws IOException
Overrides:
onReceiveBeforeRead in class AbstractWebServiceConnection
Throws:
IOException

hasResponse

protected boolean hasResponse()
                       throws IOException
Specified by:
hasResponse in class AbstractSenderConnection
Throws:
IOException

getResponseHeaderNames

protected Iterator<String> getResponseHeaderNames()
                                           throws IOException
Specified by:
getResponseHeaderNames in class AbstractSenderConnection
Throws:
IOException

getResponseHeaders

protected Iterator<String> getResponseHeaders(String name)
                                       throws IOException
Specified by:
getResponseHeaders in class AbstractSenderConnection
Throws:
IOException

getResponseInputStream

protected InputStream getResponseInputStream()
                                      throws IOException
Specified by:
getResponseInputStream in class 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 AbstractSenderConnection
Throws:
IOException


Copyright © 2013 The Spring Web Services Framework. All Rights Reserved.