nl.knowledgeplaza.util.log4j
Class SMTPAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by org.apache.log4j.net.SMTPAppender
          extended by nl.knowledgeplaza.util.log4j.SMTPAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler, org.apache.log4j.xml.UnrecognizedElementHandler

public class SMTPAppender
extends org.apache.log4j.net.SMTPAppender

This class is an extention upon the regular SMTPAppender. It uses the EvaluatorClass to accumulate events until the buffer is full and then sends them in bulk. Furthermore is hooks into the JVM's shutdown notification to be able to flush the remaining events (buffer is not full) upon shutdown.


Nested Class Summary
static class SMTPAppender.EvaluatorClass
          This class holds off on sending the mails until the buffer is full
 
Field Summary
 
Fields inherited from class org.apache.log4j.net.SMTPAppender
cb, evaluator, msg
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
SMTPAppender()
          Setup the appender
 
Method Summary
 void setEvaluatorClass(String value)
          This is not allowed
 
Methods inherited from class org.apache.log4j.net.SMTPAppender
activateOptions, addressMessage, append, checkEntryConditions, close, createSession, getBcc, getBufferSize, getCc, getEvaluator, getEvaluatorClass, getFrom, getLocationInfo, getSMTPDebug, getSMTPHost, getSMTPPassword, getSMTPUsername, getSubject, getTo, parseUnrecognizedElement, requiresLayout, sendBuffer, setBcc, setBufferSize, setCc, setEvaluator, setFrom, setLocationInfo, setSMTPDebug, setSMTPHost, setSMTPPassword, setSMTPUsername, setSubject, setTo
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMTPAppender

public SMTPAppender()
Setup the appender

Method Detail

setEvaluatorClass

public void setEvaluatorClass(String value)
This is not allowed

Overrides:
setEvaluatorClass in class org.apache.log4j.net.SMTPAppender


Copyright © 2011 KnowledgePlaza. All Rights Reserved.