jrunx.logger
Class LogEventHandler
jrunx.kernel.ServiceAdapter
|
+--jrunx.kernel.ServicePartition
|
+--jrunx.kernel.ConfigurableServicePartition
|
+--jrunx.logger.LogEventHandler
- All Implemented Interfaces:
- ConfigurableServicePartitionMBean, LogEventHandlerMBean, javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean
- Direct Known Subclasses:
- BufferLogEventHandler, ConsoleLogEventHandler, FileLogEventHandler, ThreadedLogEventHandler
- public abstract class LogEventHandler
- extends ConfigurableServicePartition
- implements LogEventHandlerMBean
Base class for a JRun Log Event Handler
- Author:
- Karl Moss
- See Also:
- Serialized Form
| Fields inherited from class jrunx.kernel.ServiceAdapter |
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER |
|
Method Summary |
void |
clearBuffer()
|
void |
flush()
Flushes all messages to the underlying destination |
java.lang.String |
getFormat()
Gets the format for log messages |
boolean |
log(LogEvent event)
Handle a log event |
abstract boolean |
logEvent(LogEvent event)
|
void |
setFormat(java.lang.String format)
Sets the format for log messages |
| Methods inherited from class jrunx.kernel.ConfigurableServicePartition |
destroy, destroyServices, init, initServices, loadAndInit, loadChildren, setChildElements, start, startServices, stop, stopServices |
| Methods inherited from class jrunx.kernel.ServiceAdapter |
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
LogEventHandler
public LogEventHandler()
log
public boolean log(LogEvent event)
- Description copied from interface:
LogEventHandlerMBean
- Handle a log event
- Specified by:
log in interface LogEventHandlerMBean
- Following copied from interface:
jrunx.logger.LogEventHandlerMBean
- Parameters:
event - The log event- Returns:
- true if the next handler in the chain should be invoked
clearBuffer
public void clearBuffer()
logEvent
public abstract boolean logEvent(LogEvent event)
setFormat
public void setFormat(java.lang.String format)
- Description copied from interface:
LogEventHandlerMBean
- Sets the format for log messages
- Specified by:
setFormat in interface LogEventHandlerMBean
- Following copied from interface:
jrunx.logger.LogEventHandlerMBean
- Parameters:
format - The log format
getFormat
public java.lang.String getFormat()
- Description copied from interface:
LogEventHandlerMBean
- Gets the format for log messages
- Specified by:
getFormat in interface LogEventHandlerMBean
- Following copied from interface:
jrunx.logger.LogEventHandlerMBean
- Returns:
- The log format
flush
public void flush()
- Description copied from interface:
LogEventHandlerMBean
- Flushes all messages to the underlying destination
- Specified by:
flush in interface LogEventHandlerMBean
Copyright � 2002 Macromedia Corporation. All Rights Reserved.