|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.net.SimpleMailer
public class SimpleMailer
Reads emails stored in files and sends them.
| Field Summary | |
|---|---|
protected int |
m_DebugLevel
the debugging level (0 = off, >0 = on). |
protected String |
m_FailedSuffix
the suffix for the emails that couldn't be sent. |
protected EmailFileReader |
m_Reader
the email reader to use. |
protected BaseRegExp |
m_RegExp
the expression to use for listing the files. |
protected AbstractSendEmail |
m_SendEmail
for sending the mail. |
protected String |
m_SuccessfulSuffix
the suffix for the successfully sent emails. |
protected PlaceholderDirectory |
m_WatchDir
the directory to watch. |
| Constructor Summary | |
|---|---|
SimpleMailer()
|
|
| Method Summary | |
|---|---|
protected void |
debug(String msg)
Processes the debugging message. |
protected void |
debug(String msg,
int level)
Processes the debugging message. |
String |
debugLevelTipText()
Returns the tip text for this property. |
void |
execute()
Locates and sends the emails. |
String |
failedSuffixTipText()
Returns the tip text for this property. |
int |
getDebugLevel()
Returns the debugging level (0 = turned off). |
String |
getFailedSuffix()
Returns the suffix for emails that couldn't get sent. |
EmailFileReader |
getReader()
Returns the reader for the email files. |
BaseRegExp |
getRegExp()
Returns the regular expression to match the files against. |
AbstractSendEmail |
getSendEmail()
Returns the send email scheme in use. |
String |
getSuccessfulSuffix()
Returns the suffix for successfully sent emails. |
PlaceholderDirectory |
getWatchDir()
Returns the directory to watch. |
protected boolean |
isDebugOn()
Returns true if debugging output is turned on (any level). |
protected String[] |
list()
Lists the files in the watch directory. |
static void |
main(String[] args)
For running the mailer from command-line. |
String |
readerTipText()
Returns the tip text for this property. |
String |
regExpTipText()
Returns the tip text for this property. |
static void |
runMailer(String[] options)
Runs the mailer from the commandline. |
String |
sendEmailTipText()
Returns the tip text for this property. |
void |
setDebugLevel(int value)
Sets the debugging level (0 = off). |
void |
setFailedSuffix(String value)
Sets the suffix for emails that couldn't get sent. |
void |
setReader(EmailFileReader value)
Sets the reader for the email files. |
void |
setRegExp(BaseRegExp value)
Sets the regular expression to match the files against. |
void |
setSendEmail(AbstractSendEmail value)
Sets the send email scheme to use. |
void |
setSuccessfulSuffix(String value)
Sets the suffix for successfully sent emails. |
void |
setWatchDir(PlaceholderDirectory value)
Sets the directory to watch. |
String |
successfulSuffixTipText()
Returns the tip text for this property. |
String |
watchDirTipText()
Returns the tip text for this property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int m_DebugLevel
protected EmailFileReader m_Reader
protected PlaceholderDirectory m_WatchDir
protected BaseRegExp m_RegExp
protected AbstractSendEmail m_SendEmail
protected String m_SuccessfulSuffix
protected String m_FailedSuffix
| Constructor Detail |
|---|
public SimpleMailer()
| Method Detail |
|---|
public void setDebugLevel(int value)
value - >0 if debugging output should be printedpublic int getDebugLevel()
public String debugLevelTipText()
protected boolean isDebugOn()
protected void debug(String msg)
msg - the debugging message to process
protected void debug(String msg,
int level)
level - the debugging levelmsg - the debugging message to processpublic void setReader(EmailFileReader value)
value - the readerpublic EmailFileReader getReader()
public String readerTipText()
public void setWatchDir(PlaceholderDirectory value)
value - the directorypublic PlaceholderDirectory getWatchDir()
public String watchDirTipText()
public void setRegExp(BaseRegExp value)
value - the regular expressionpublic BaseRegExp getRegExp()
public String regExpTipText()
public void setSendEmail(AbstractSendEmail value)
value - the send emailpublic AbstractSendEmail getSendEmail()
public String sendEmailTipText()
public void setSuccessfulSuffix(String value)
value - the suffix (incl dot)public String getSuccessfulSuffix()
public String successfulSuffixTipText()
public void setFailedSuffix(String value)
value - the suffix (incl dot)public String getFailedSuffix()
public String failedSuffixTipText()
protected String[] list()
public void execute()
public static void runMailer(String[] options)
options - the commandline optionspublic static void main(String[] args)
Environment.
args - the command-line arguments, use -h/-help to display them
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||