@Component public class DefaultMailSessionProvider extends Object implements MailSessionProvider
Default implementation of the MailSessionProvider SPI.
This implemenation looks up a mail session in JNDI using the name configured in CycleConfiguration.getMailSessionName().
If that name is null, a set of default mail session names is used in order to autodetect a mail session.
| Constructor and Description | 
|---|
DefaultMailSessionProvider()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected String[] | 
getKnownDefaultMailSessionNames()  | 
javax.mail.Session | 
lookupMailSession()
Looks up the mail session using the configured name in  
CycleConfiguration.getMailSessionName(). | 
protected javax.mail.Session | 
performLookup(String mailSessionName)  | 
void | 
sendMail(javax.mail.Message msg,
        javax.mail.Session session)
Ends the message using a transport at the discretion of the  
MailSessionProvider. | 
protected javax.mail.Session | 
tryAutoDetectMailSession()  | 
public javax.mail.Session lookupMailSession()
MailSessionProviderCycleConfiguration.getMailSessionName().lookupMailSession in interface MailSessionProviderSessionprotected javax.mail.Session performLookup(String mailSessionName)
protected javax.mail.Session tryAutoDetectMailSession()
protected String[] getKnownDefaultMailSessionNames()
public void sendMail(javax.mail.Message msg,
            javax.mail.Session session)
MailSessionProviderMailSessionProvider.sendMail in interface MailSessionProviderCopyright © 2015. All rights reserved.