com.extrememessaging.ResponseMaster.monitor
Class CMonitorBase

java.lang.Object
  extended by com.extrememessaging.ResponseMaster.monitor.CMonitorBase
All Implemented Interfaces:
IConfigurableItem, IMonitor
Direct Known Subclasses:
CLogger, DBLogger, EmailMonitor, MonitorLog4j

public class CMonitorBase
extends java.lang.Object
implements IMonitor

Derive from this class if you want to implement a monitor class that implements only a small subset of the functions


Constructor Summary
CMonitorBase()
           
 
Method Summary
 void CategoryDefinitionsLoaded()
          The category definition file finished loading New in build 595.
 void Initialize(java.lang.String parameter)
          Initialize using the parameter from the config file.
 void LogError(java.lang.String sMessage)
          Log an error
 void LogError(java.lang.String sMessage, java.lang.Throwable e)
          Log an error from a Throwable Changed to Throwable (from Exception) and overload with Error was removed in build 606
static int LoggingLevelFromString(java.lang.String value)
           
static java.lang.String LoggingLevelNameFromValue(int value)
           
 void LogSystem(java.lang.String sMessage)
          Log a system message
 void LogTrace(java.lang.String sMessage)
          Log a tracing message If the logging level is Errors or Warnings, this doesn't do anything
 void LogTrace(java.lang.String sMessage, java.lang.Throwable e)
          Log a tracing message from a Throwable If the logging level is Errors or Warnings, this doesn't do anything Changed to Throwable (from Exception) in build 606
 void LogWarning(java.lang.String sMessage)
          Log a warning If the logging level is Errors, this doesn't do anything
 void LogWarning(java.lang.String sMessage, java.lang.Throwable e)
          Log a warning from a Throwable If the logging level is Errors, this doesn't do anything Changed to Throwable (from Exception) in build 606
 void MailboxEmpty(java.lang.String sMailboxName)
          This is fired every time we check the mailbox for messages, and we find that it is empty.
 void MailboxInitializationBegun(java.lang.String sMailboxName)
          The mailbox initialization process started for a particular mailbox New in build 627
 void MailboxInitializationFinished(java.lang.String sMailboxName)
          The mailbox initialization process completed for a particular mailbox New in build 627
 void MailboxShutdownBegun(java.lang.String sMailboxName)
          The mailbox shutdown process began for a particular mailbox New in build 627
 void MailboxShutdownFinished(java.lang.String sMailboxName)
          The mailbox shutdown process finished for a particular mailbox New in build 627
 void MessageCategorized(int CategoryID)
          A message was categorized into a particular category.
 void MessageProcessed(CMessage oMessage)
          A message was processed Changed in build 595
 void MessageSkipped()
          A message was deleted without processing because the headers could not be loaded.
 void Shutdown()
          Cleanup any resources you allocated during construction or operation.
 void ThreadKilled(int nThreadNumber, java.util.Date dtLastUpdate)
          A thread was killed because it was inactive for too long New in build 595
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMonitorBase

public CMonitorBase()
Method Detail

Initialize

public void Initialize(java.lang.String parameter)
                throws ResponseMasterException
Description copied from interface: IConfigurableItem
Initialize using the parameter from the config file. Frequently, the parameter will be a file name

Specified by:
Initialize in interface IConfigurableItem
Throws:
ResponseMasterException

Shutdown

public void Shutdown()
Description copied from interface: IConfigurableItem
Cleanup any resources you allocated during construction or operation. After this is called, nothing else will be called, unless Initialize is called again. Note: Shutdown may be called more than once on the same object New in build 595.

Specified by:
Shutdown in interface IConfigurableItem

LogError

public void LogError(java.lang.String sMessage)
Description copied from interface: IMonitor
Log an error

Specified by:
LogError in interface IMonitor
Parameters:
sMessage - The message to log

LogError

public void LogError(java.lang.String sMessage,
                     java.lang.Throwable e)
Description copied from interface: IMonitor
Log an error from a Throwable Changed to Throwable (from Exception) and overload with Error was removed in build 606

Specified by:
LogError in interface IMonitor
Parameters:
sMessage - The message to log
e - The Throwable to log

LogWarning

public void LogWarning(java.lang.String sMessage)
Description copied from interface: IMonitor
Log a warning If the logging level is Errors, this doesn't do anything

Specified by:
LogWarning in interface IMonitor
Parameters:
sMessage - The message to log

LogWarning

public void LogWarning(java.lang.String sMessage,
                       java.lang.Throwable e)
Description copied from interface: IMonitor
Log a warning from a Throwable If the logging level is Errors, this doesn't do anything Changed to Throwable (from Exception) in build 606

Specified by:
LogWarning in interface IMonitor
Parameters:
sMessage - The message to log
e - The Throwable to log

LogTrace

public void LogTrace(java.lang.String sMessage)
Description copied from interface: IMonitor
Log a tracing message If the logging level is Errors or Warnings, this doesn't do anything

Specified by:
LogTrace in interface IMonitor
Parameters:
sMessage - The message to log

LogTrace

public void LogTrace(java.lang.String sMessage,
                     java.lang.Throwable e)
Description copied from interface: IMonitor
Log a tracing message from a Throwable If the logging level is Errors or Warnings, this doesn't do anything Changed to Throwable (from Exception) in build 606

Specified by:
LogTrace in interface IMonitor
Parameters:
sMessage - The message to log
e - The Throwable to log

LogSystem

public void LogSystem(java.lang.String sMessage)
Description copied from interface: IMonitor
Log a system message

Specified by:
LogSystem in interface IMonitor
Parameters:
sMessage - The message to log

MessageProcessed

public void MessageProcessed(CMessage oMessage)
Description copied from interface: IMonitor
A message was processed Changed in build 595

Specified by:
MessageProcessed in interface IMonitor

MessageCategorized

public void MessageCategorized(int CategoryID)
Description copied from interface: IMonitor
A message was categorized into a particular category. New in build 595.

Specified by:
MessageCategorized in interface IMonitor

CategoryDefinitionsLoaded

public void CategoryDefinitionsLoaded()
Description copied from interface: IMonitor
The category definition file finished loading New in build 595.

Specified by:
CategoryDefinitionsLoaded in interface IMonitor

ThreadKilled

public void ThreadKilled(int nThreadNumber,
                         java.util.Date dtLastUpdate)
Description copied from interface: IMonitor
A thread was killed because it was inactive for too long New in build 595

Specified by:
ThreadKilled in interface IMonitor

MessageSkipped

public void MessageSkipped()
Description copied from interface: IMonitor
A message was deleted without processing because the headers could not be loaded. New in build 595

Specified by:
MessageSkipped in interface IMonitor

MailboxInitializationBegun

public void MailboxInitializationBegun(java.lang.String sMailboxName)
Description copied from interface: IMonitor
The mailbox initialization process started for a particular mailbox New in build 627

Specified by:
MailboxInitializationBegun in interface IMonitor
Parameters:
sMailboxName - The name of the mailbox

MailboxInitializationFinished

public void MailboxInitializationFinished(java.lang.String sMailboxName)
Description copied from interface: IMonitor
The mailbox initialization process completed for a particular mailbox New in build 627

Specified by:
MailboxInitializationFinished in interface IMonitor
Parameters:
sMailboxName - The name of the mailbox

MailboxShutdownBegun

public void MailboxShutdownBegun(java.lang.String sMailboxName)
Description copied from interface: IMonitor
The mailbox shutdown process began for a particular mailbox New in build 627

Specified by:
MailboxShutdownBegun in interface IMonitor
Parameters:
sMailboxName - The name of the mailbox

MailboxShutdownFinished

public void MailboxShutdownFinished(java.lang.String sMailboxName)
Description copied from interface: IMonitor
The mailbox shutdown process finished for a particular mailbox New in build 627

Specified by:
MailboxShutdownFinished in interface IMonitor
Parameters:
sMailboxName - The name of the mailbox

MailboxEmpty

public void MailboxEmpty(java.lang.String sMailboxName)
Description copied from interface: IMonitor
This is fired every time we check the mailbox for messages, and we find that it is empty. Note: It can fire multiple times without the mailbox getting messages in between. New in build 627

Specified by:
MailboxEmpty in interface IMonitor
Parameters:
sMailboxName - The name of the mailbox

LoggingLevelNameFromValue

public static java.lang.String LoggingLevelNameFromValue(int value)

LoggingLevelFromString

public static int LoggingLevelFromString(java.lang.String value)