toolbox.services.util.logging
Class LoggingServiceAsyncImpl

Package class diagram package LoggingServiceAsyncImpl
java.lang.Object
  extended by toolbox.services.BaseService
      extended by toolbox.services.util.logging.LoggingServiceAsyncImpl
All Implemented Interfaces:
Service, LoggingService

public class LoggingServiceAsyncImpl
extends BaseService
implements LoggingService

LoggingService implementation that can output LogMessage instances to multiple LoggingService instances asynchronously.


Nested Class Summary
(package private)  class LoggingServiceAsyncImpl.AsyncLoggingWorker
          Worker class to handle asynchronous logging events.
 
Constructor Summary
LoggingServiceAsyncImpl()
          Default constructor.
 
Method Summary
 void addLoggingService(LoggingService service)
          Injection point to add LoggingService instances.
 void create(java.lang.String name, java.lang.String confHome, ServiceEnvironment env, XMLProperties xmlProps)
          Create the required async buffering infrastructure.
 void destroy()
          Destroy this service.
 void log(LogMessage message)
          Log the given message using the level set on the message.
 void logError(LogMessage message)
          Log the given message as an error (ERROR).
 void logFatal(LogMessage message)
          Log the given message as fatal (FATAL).
 void logInfo(LogMessage message)
          Log the given message as informational (INFO).
 void logWarning(LogMessage message)
          Log the given message as a warning (WARN).
 
Methods inherited from class toolbox.services.BaseService
getConfigHome, getName, getProperties, getProperty, getXMLProperties, logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingServiceAsyncImpl

public LoggingServiceAsyncImpl()
Default constructor.

Method Detail

create

public void create(java.lang.String name,
                   java.lang.String confHome,
                   ServiceEnvironment env,
                   XMLProperties xmlProps)
            throws ServiceException
Create the required async buffering infrastructure.

Specified by:
create in interface Service
Overrides:
create in class BaseService
Parameters:
name - The name of the service.
confHome - The path to the configuration home directory.
env - ServiceEnvironment of this service.
xmlProps - XML configuration properties.
Throws:
ServiceException - if the service cannot be created.

logInfo

public void logInfo(LogMessage message)
Log the given message as informational (INFO).

Specified by:
logInfo in interface LoggingService
Parameters:
message - LogMessage to log.

logWarning

public void logWarning(LogMessage message)
Log the given message as a warning (WARN).

Specified by:
logWarning in interface LoggingService
Parameters:
message - LogMessage to log.

logError

public void logError(LogMessage message)
Log the given message as an error (ERROR).

Specified by:
logError in interface LoggingService
Parameters:
message - LogMessage to log.

logFatal

public void logFatal(LogMessage message)
Log the given message as fatal (FATAL).

Specified by:
logFatal in interface LoggingService
Parameters:
message - LogMessage to log.

log

public void log(LogMessage message)
Log the given message using the level set on the message.

Specified by:
log in interface LoggingService
Parameters:
message - LogMessage to log.

addLoggingService

public void addLoggingService(LoggingService service)
Injection point to add LoggingService instances.

Parameters:
service - LoggingService instance to add to the list.

destroy

public void destroy()
Destroy this service.

Specified by:
destroy in interface Service
Overrides:
destroy in class BaseService