org.jwarp.service.log
Class LogService

java.lang.Object
  |
  +--org.jwarp.service.AService
        |
        +--org.jwarp.service.log.LogService
All Implemented Interfaces:
IConfigurable, IExceptionProvider, ILogService, IReferenceable, IService

public class LogService
extends AService
implements ILogService

This is the implementation of the log service interface.

Version:
1.0
Author:
Martin Schäfer, Anatole Tresch

Fields inherited from class org.jwarp.service.AService
context, createdDate, dependencies, emptyProperties, exceptionListeners, log, resumedDate, serviceName, serviceStatus, serviceType, startedDate, stoppedDate, suspendedDate, systemTicket
 
Fields inherited from interface org.jwarp.service.log.ILogService
SERVICE_TYPE
 
Fields inherited from interface org.jwarp.service.IService
SERVICE_STATUS_CREATED, SERVICE_STATUS_NOT_AVAILABLE, SERVICE_STATUS_READY, SERVICE_STATUS_RESUMING, SERVICE_STATUS_RUNNING, SERVICE_STATUS_STARTING, SERVICE_STATUS_STOPPED, SERVICE_STATUS_STOPPING, SERVICE_STATUS_SUSPENDED
 
Constructor Summary
LogService()
          Creates a log service
 
Method Summary
 void addLog(ILogWriter log, java.lang.String logName)
          Adds a log as an service item.
 void configure(org.jdom.Element configuration)
          This configures the service.
 ILogWriter getLogWriter()
          Returns the default LogWriter
 ILogWriter getLogWriter(java.lang.String name)
          Returns the LogWriter identified by name
 ILogWriter removeLog(java.lang.String name)
           
 
Methods inherited from class org.jwarp.service.AService
addExceptionListener, checkContext, createLogFromXML, getContext, getCreationDate, getDependencies, getExceptionListeners, getLog, getLogLevel, getName, getReference, getResumedDate, getShutDownDate, getStartDate, getStatus, getSuspendedDate, getType, removeAllExceptionListeners, removeExceptionListener, resume, sendExceptionEvent, setContext, setDependencies, setLogLevel, setName, shutdown, start, suspend
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jwarp.service.IService
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel, shutdown, start, suspend
 
Methods inherited from interface org.jwarp.common.IExceptionProvider
addExceptionListener, getExceptionListeners, removeAllExceptionListeners, removeExceptionListener
 

Constructor Detail

LogService

public LogService()
Creates a log service
Method Detail

getLogWriter

public ILogWriter getLogWriter()
Returns the default LogWriter
Specified by:
getLogWriter in interface ILogService

getLogWriter

public ILogWriter getLogWriter(java.lang.String name)
Returns the LogWriter identified by name
Specified by:
getLogWriter in interface ILogService
Parameters:
name - Name of the LogWriter
Returns:
The LogWriter or null, if the name does not match a valid LogWriter

configure

public void configure(org.jdom.Element configuration)
               throws ConfigurationException
This configures the service. The service can be configured and then started independently.
Specified by:
configure in interface IConfigurable
Overrides:
configure in class AService
Parameters:
configuration - the configuration root for this service
Throws:
ServiceConfigurationException - If the configuration is missing or invalid

addLog

public void addLog(ILogWriter log,
                   java.lang.String logName)
Adds a log as an service item. This method is used on setting up an application environment.
Specified by:
addLog in interface ILogService
Parameters:
log - The new log
logName - The name under which the log should be registered
ticket - The user

removeLog

public ILogWriter removeLog(java.lang.String name)

©   O R C A   S y s t e m s