|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jlf.log.QueueProcessor | +--org.jlf.log.smtpMechanism.SMTPQueueProcessor
The SNMPQueueProcessor
class is a concrete class designed to
offload the processing of emailing log entries.
Field Summary | |
protected java.util.Hashtable |
logEntryQueues
Holds a hashtable of LogEntryQueue
objects with the key to the table being a concatenation
of log name.loggingLevel and the value being the
log entry queue to hold log entries of that type. |
protected javax.mail.Session |
session
Cache the session |
protected static SMTPQueueProcessor |
singleton
Provides the class variable for the Singleton pattern, to keep track of the one and only instance of this class. |
protected javax.mail.Transport |
transport
Cache the transport |
protected static java.lang.String |
TRANSPORT_HOST_DEFAULT
|
protected static java.lang.String |
TRANSPORT_HOST_PROPERTY
|
protected static java.lang.String |
TRANSPORT_PASSWORD_DEFAULT
|
protected static java.lang.String |
TRANSPORT_PASSWORD_PROPERTY
|
protected static java.lang.String |
TRANSPORT_USER_DEFAULT
|
protected static java.lang.String |
TRANSPORT_USER_PROPERTY
|
Fields inherited from class org.jlf.log.QueueProcessor |
NEVER_TIME_OUT_WAIT, processorQueue, processorThread, producerQueue, timeOutInMilliseconds |
Constructor Summary | |
protected |
SMTPQueueProcessor()
Default constructor, protected to implement the Singleton pattern, calls the superclass. |
Method Summary | |
protected void |
addLogEntry(LogEntry logEntry)
Add entry to log entry queue to be later dumped. |
static SMTPQueueProcessor |
getInstance()
Returns the singleton instance of this class. |
protected LogEntryQueue |
getLogEntryQueue(LogEntry logEntry)
Finds (or creates a new) log entry queue for the log entry. |
protected javax.mail.Session |
getSession()
Lazy-initialized getter for the transport. |
protected javax.mail.Transport |
getTransport()
Lazy-initialized getter for the transport. |
protected void |
processItem(java.lang.Object queueItem)
Processes a constructed queue item. |
protected void |
processQueueItems()
Iterates through the collection of processorQueue items to process them. |
protected void |
resetSession()
Resets the lazy-initialized session object, to be called when the session fails. |
protected void |
resetTransport()
Resets the lazy-initialized transport object, to be called when the transport fails. |
protected void |
sendLogEmail(Log log,
int loggingLevel,
java.lang.String logString)
Helper method to send out an email for a particular log, logging level, and log string. |
Methods inherited from class org.jlf.log.QueueProcessor |
enqueue, run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static SMTPQueueProcessor singleton
protected java.util.Hashtable logEntryQueues
LogEntryQueue
objects with the key to the table being a concatenation
of log name.loggingLevel and the value being the
log entry queue to hold log entries of that type.
protected static final java.lang.String TRANSPORT_HOST_PROPERTY
protected static final java.lang.String TRANSPORT_HOST_DEFAULT
protected static final java.lang.String TRANSPORT_USER_PROPERTY
protected static final java.lang.String TRANSPORT_USER_DEFAULT
protected static final java.lang.String TRANSPORT_PASSWORD_PROPERTY
protected static final java.lang.String TRANSPORT_PASSWORD_DEFAULT
protected javax.mail.Session session
protected javax.mail.Transport transport
Constructor Detail |
protected SMTPQueueProcessor()
Method Detail |
public static SMTPQueueProcessor getInstance()
protected LogEntryQueue getLogEntryQueue(LogEntry logEntry)
protected void addLogEntry(LogEntry logEntry)
protected javax.mail.Session getSession()
protected void resetSession()
protected javax.mail.Transport getTransport()
protected void resetTransport()
protected void processQueueItems()
processQueueItems
in class QueueProcessor
protected void processItem(java.lang.Object queueItem)
processItem
in class QueueProcessor
protected void sendLogEmail(Log log, int loggingLevel, java.lang.String logString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |