com.antelmann.util.logging
Class EmailWriter
java.lang.Object
com.antelmann.util.logging.AbstractLogWriter<String>
com.antelmann.util.logging.XMLLogWriter
com.antelmann.util.logging.EmailWriter
- All Implemented Interfaces:
- Filter<LogEntry>, LogWriter, Closeable
public class EmailWriter
- extends XMLLogWriter
uses email to send each LogEntry object over the Internet.
The body of each email message uses the XML format of the super class.
As sending the email may take some time, you should consider using
an AsynchLogWriter with this EmailWriter.
- Author:
- Holger Antelmann
- See Also:
AsynchLogWriter,
POP3Account
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmailWriter
public EmailWriter(POP3Account service,
String toAddress)
EmailWriter
public EmailWriter(POP3Account service,
String toAddress,
String subjectLine)
setEmailProcessor
public void setEmailProcessor(Processor<Email,RuntimeException> emailProcessor)
write
public void write(LogEntry entry)
throws LogException
- sends the email
- Specified by:
write in interface LogWriter- Overrides:
write in class AbstractLogWriter<String>
- Throws:
LogException - if an error occurred while writing the log
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads