|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.config.DefaultConfigurable
org.norther.tammi.core.config.DefaultConfigurableFactory
org.norther.tammi.core.logger.AbstractLogger
org.norther.tammi.core.logger.AbstractThreadedLogger
public abstract class AbstractThreadedLogger
An abstract implementation of ThreadedLogger.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.logger.AbstractLogger |
|---|
traceOn |
| Fields inherited from class org.norther.tammi.core.config.DefaultConfigurable |
|---|
MODIFIED, SYNCHRONIZED, UNMODIFIED |
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.logger.Logger |
|---|
ACCESS, DEBUG, ERROR, FATAL, INFO, NONE, TRACE, WARN, WARNING |
| Fields inherited from interface org.norther.tammi.acorn.locale.Localizer |
|---|
ANY_NAME |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
AbstractThreadedLogger()
Constructs a new logger. |
|
| Method Summary | |
|---|---|
void |
flush()
Flushes queued log entries. |
protected void |
flush(BlockingQueue queue)
Flushes the log buffer. |
ObjectName |
getExecutorName()
Gets the the executor of this executable. |
boolean |
isStarted()
Checks whether the startable has been started. |
protected void |
push(LogEntry entry)
Pushes a log entry into a buffer. |
void |
run()
Polls the log entry queue and writes entries to the log. |
void |
setBufferSize(int size)
Sets the log buffer size. |
void |
setExecutorName(ObjectName executor)
Sets the executor of this executable. |
void |
start()
Starts the MBean. |
void |
stop()
Stops the MBean. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
protected abstract void |
write(LogEntry entry)
Writes the log entry to the log. |
| Methods inherited from class org.norther.tammi.core.config.DefaultConfigurableFactory |
|---|
getInstance, getInstance, getInstance |
| Methods inherited from class org.norther.tammi.core.config.DefaultConfigurable |
|---|
addProperty, addProperty, clearProperties, containsProperty, getConfigKey, getConfiguration, getModifiedState, getProperties, getProperty, getPropertyFilePath, indexOfProperty, loadConfiguration, loadConfiguration, loadConfiguration, modified, propertyMap, propertyMap, removeProperty, removeProperty, setConfigKey, setModifiedState, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, storeProperties |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.logger.Logger |
|---|
addAppender, addFilter, clearAppenders, clearFilters, getAdditivity, getAppenderNames, getBufferSize, getFilters, getLevel, getLevel, getLocalizedMessage, getLocalizedMessage, getLogClassName, getLoggerClassName, getLoggerName, getPollingInterval, getTimeZoneId, isDefaultLogFactory, isLog, isLog, isStackTrace, isStaticTrace, isSystemErrLogged, isSystemOutLogged, log, log, log, log, log, log, log, log, log, log, release, removeAppender, removeFilter, setAdditivity, setDefaultLogFactory, setFilters, setLevel, setLevel, setLevelAsString, setLevelAsString, setLogClassName, setLoggerName, setPollingInterval, setStackTrace, setStaticTrace, setSystemErrLogged, setSystemOutLogged, setTimeZoneId |
| Methods inherited from interface org.norther.tammi.core.base.ObjectFactory |
|---|
getInstance, getInstance, getInstance, getInstance, isLoaderSupported |
| Methods inherited from interface org.norther.tammi.core.config.Configurable |
|---|
addProperty, addProperty, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, storeProperties |
| Methods inherited from interface org.norther.tammi.core.locale.ResourceMap |
|---|
clearResourceBundleNames, getDefaultBaseName, getFallbackResourcesName, getPlugInBaseName, getResourceBundle, getResourceBundle, getResourceBundleName, getResourceFinderName, qualifierSet, removeResourceBundleName, resolveResourceBundle, resolveResourceBundle, resolveResourceBundleName, setDefaultBaseName, setFallbackResourcesName, setResourceBundleName, setResourceFinderName |
| Methods inherited from interface org.norther.tammi.acorn.locale.Localizer |
|---|
resolveLocalizedObject, resolveLocalizedObject, resolveLocalizedResource, resolveLocalizedResource, resolveLocalizedString, resolveLocalizedString, resolveLocalizedStrings, resolveLocalizedStrings |
| Methods inherited from interface org.norther.tammi.core.cache.CacheClient |
|---|
clearCached, expireCached, expireFraction, getCache, isCachingDisabled, removeCache, setCachingDisabled |
| Methods inherited from interface org.norther.tammi.core.base.Refreshable |
|---|
getRefreshed, refresh |
| Constructor Detail |
|---|
public AbstractThreadedLogger()
| Method Detail |
|---|
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class AbstractLoggerException - if the adaptee refused to be unmanaged.public ObjectName getExecutorName()
Executable
getExecutorName in interface Executablepublic void setExecutorName(ObjectName executor)
ExecutableNote that it will be taken into use after next start.
setExecutorName in interface Executableexecutor - the object name of the executor or a query.public boolean isStarted()
Startable
isStarted in interface Startable
public void start()
throws Exception
Startable
start in interface StartableException - if start fails.public void stop()
Startable
stop in interface Startablepublic void run()
run in interface Runnablepublic void setBufferSize(int size)
Logger
setBufferSize in interface LoggersetBufferSize in class AbstractLoggersize - the buffer size as a number of log entries.public void flush()
Logger
flush in interface Loggerflush in class AbstractLoggerprotected void push(LogEntry entry)
push in class AbstractLoggerentry - a log entry.protected void flush(BlockingQueue queue)
queue - the entry queue.protected abstract void write(LogEntry entry)
entry - the log entry.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||