|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.ws.transport.mail.MailMessageSender
public class MailMessageSender
WebServiceMessageSender
implementation that uses Mail MimeMessage
s. Requires a transport
and store
URI to be set.
WebServiceConnection.receive(WebServiceMessageFactory)
on connections created by this message sender
will result in a blocking call, for the amount of milliseconds specified by the receiveSleepTime
property. This will give the server time to formulate a response message. By default, this propery
is set to 1 minute. For a proper request-response conversation to work, this property value must not be smaller the
pollingInterval
property of the server-side message
receiver polling strategy.
This message sender supports URI's of the following format: mailto:to[?param-name=param-value][¶m-name=param-value]*where the characters :, ?, and & stand for themselves. The to represents a RFC 822 mailbox. Valid param-name include:
Some examples of email URIs are:
param-name Description subject The subject of the request message.
mailto:[email protected]
mailto:[email protected]@?subject=SOAP%20Test
Field Summary | |
---|---|
static long |
DEFAULT_RECEIVE_TIMEOUT
Default timeout for receive operations. |
Constructor Summary | |
---|---|
MailMessageSender()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
WebServiceConnection |
createConnection(URI uri)
Create a new WebServiceConnection to the specified URI. |
void |
setFrom(String from)
Sets the from address to use when sending request messages. |
void |
setJavaMailProperties(Properties javaMailProperties)
Set JavaMail properties for the Session . |
void |
setReceiveSleepTime(long receiveSleepTime)
Set the sleep time to use for receive calls, in milliseconds. |
void |
setSession(Session session)
Set the JavaMail Session , possibly pulled from JNDI. |
void |
setStoreUri(String storeUri)
Sets the JavaMail Store URI to be used for retrieving response messages. |
void |
setTransportUri(String transportUri)
Sets the JavaMail Transport URI to be used for sending response messages. |
boolean |
supports(URI uri)
Does this WebServiceMessageSender support the supplied URI? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_RECEIVE_TIMEOUT
Constructor Detail |
---|
public MailMessageSender()
Method Detail |
---|
public void setFrom(String from) throws AddressException
AddressException
public void setJavaMailProperties(Properties javaMailProperties)
Session
.
A new Session
will be created with those properties. Use either this method or setSession(javax.mail.Session)
, but
not both.
Non-default properties in this instance will override given JavaMail properties.
public void setReceiveSleepTime(long receiveSleepTime)
public void setSession(Session session)
Session
, possibly pulled from JNDI.
Default is a new Session
without defaults, that is completely configured via this instance's
properties.
If using a pre-configured Session
, non-default properties in this instance will override the
settings in the Session
.
setJavaMailProperties(java.util.Properties)
public void setStoreUri(String storeUri)
[imap|pop3]://user:password@host:port/INBOX
. Setting this property is required.
For example, imap://john:[email protected]/INBOX
Session.getStore(URLName)
public void setTransportUri(String transportUri)
smtp://user:password@host:port
. Setting this property is required.
For example, smtp://john:[email protected]
Session.getTransport(URLName)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public WebServiceConnection createConnection(URI uri) throws IOException
WebServiceMessageSender
WebServiceConnection
to the specified URI.
createConnection
in interface WebServiceMessageSender
uri
- the URI to open a connection to
IOException
- in case of I/O errorspublic boolean supports(URI uri)
WebServiceMessageSender
WebServiceMessageSender
support the supplied URI?
supports
in interface WebServiceMessageSender
uri
- the URI to be checked
true
if this WebServiceMessageSender
supports the supplied URI
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |