|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.quartz.jobs.ee.mail.SendMailJob
public class SendMailJob
A Job which sends an e-mail with the configured content to the configured recipient.
Nested Class Summary | |
---|---|
protected static class |
SendMailJob.MailInfo
|
Field Summary | |
---|---|
static java.lang.String |
PROP_CC_RECIPIENT
The e-mail address to cc the mail to. |
static java.lang.String |
PROP_CONTENT_TYPE
The message content type. |
static java.lang.String |
PROP_MESSAGE
The e-mail message body. |
static java.lang.String |
PROP_RECIPIENT
The e-mail address to send the mail to. |
static java.lang.String |
PROP_REPLY_TO
The e-mail address the message should say to reply to. |
static java.lang.String |
PROP_SENDER
The e-mail address to claim the mail is from. |
static java.lang.String |
PROP_SMTP_HOST
The host name of the smtp server. |
static java.lang.String |
PROP_SUBJECT
The subject to place on the e-mail. |
Constructor Summary | |
---|---|
SendMailJob()
|
Method Summary | |
---|---|
protected SendMailJob.MailInfo |
createMailInfo()
|
void |
execute(JobExecutionContext context)
Called by the when a
fires that is associated with the Job . |
protected org.slf4j.Logger |
getLog()
|
protected javax.mail.Session |
getMailSession(SendMailJob.MailInfo mailInfo)
|
protected java.lang.String |
getOptionalParm(JobDataMap data,
java.lang.String property)
|
protected java.lang.String |
getRequiredParm(JobDataMap data,
java.lang.String property,
java.lang.String constantName)
|
protected SendMailJob.MailInfo |
populateMailInfo(JobDataMap data,
SendMailJob.MailInfo mailInfo)
|
protected javax.mail.internet.MimeMessage |
prepareMimeMessage(SendMailJob.MailInfo mailInfo)
|
protected void |
setMimeMessageContent(javax.mail.internet.MimeMessage mimeMessage,
SendMailJob.MailInfo mailInfo)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_SMTP_HOST
public static final java.lang.String PROP_RECIPIENT
public static final java.lang.String PROP_CC_RECIPIENT
public static final java.lang.String PROP_SENDER
public static final java.lang.String PROP_REPLY_TO
public static final java.lang.String PROP_SUBJECT
public static final java.lang.String PROP_MESSAGE
public static final java.lang.String PROP_CONTENT_TYPE
Constructor Detail |
---|
public SendMailJob()
Method Detail |
---|
public void execute(JobExecutionContext context) throws JobExecutionException
Job
Called by the
when a Scheduler
fires that is associated with the Trigger
Job
.
The implementation may wish to set a
result
object on the
JobExecutionContext
before this method exits. The result itself
is meaningless to Quartz, but may be informative to
or
JobListener
s
that are watching the job's
execution.
TriggerListener
s
execute
in interface Job
JobExecutionException
- if there is an exception while executing the job.Job.execute(org.quartz.JobExecutionContext)
protected org.slf4j.Logger getLog()
protected javax.mail.internet.MimeMessage prepareMimeMessage(SendMailJob.MailInfo mailInfo) throws javax.mail.MessagingException
javax.mail.MessagingException
protected void setMimeMessageContent(javax.mail.internet.MimeMessage mimeMessage, SendMailJob.MailInfo mailInfo) throws javax.mail.MessagingException
javax.mail.MessagingException
protected javax.mail.Session getMailSession(SendMailJob.MailInfo mailInfo) throws javax.mail.MessagingException
javax.mail.MessagingException
protected SendMailJob.MailInfo createMailInfo()
protected SendMailJob.MailInfo populateMailInfo(JobDataMap data, SendMailJob.MailInfo mailInfo)
protected java.lang.String getRequiredParm(JobDataMap data, java.lang.String property, java.lang.String constantName)
protected java.lang.String getOptionalParm(JobDataMap data, java.lang.String property)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |