|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.x4juli.global.components.AbstractComponent
The basic implementation for all x4juli components.
Logging API as a whole was originally done for Apache log4j. Juli is a port of main parts of that to complete the Java Logging APIs. All credits for initial idea, design, implementation, documentation belong to the log4j crew. This file was originally published by Ceki Gülcü. Please use exclusively the appropriate mailing lists for questions, remarks and contribution.
| Field Summary | |
private static java.util.Map |
componentloggers
|
private int |
errorCount
|
(package private) static java.util.logging.Level |
INTERNAL_LOG_LEVEL
|
private ExtendedLogger |
logger
|
protected java.util.logging.LogManager |
manager
Easy access to the LogManager for this component. |
protected ObjectStore |
repository
Contains objects for this component. |
| Constructor Summary | |
AbstractComponent()
|
|
| Method Summary | |
protected ExtendedLogger |
getLogger()
Return an instance specific logger to be used by the component itself. |
(package private) static ExtendedLogger |
getLogger(java.lang.String name,
java.lang.String resourceBundle)
|
protected ObjectStore |
getLoggerRepository()
Return the ObjectStore this component is attached to. |
MessageProperties |
getMessageProperties()
Specifiy Properties for the component. Default Implementation returns null. |
protected ExtendedLogger |
getNonFloodingLogger()
Frequently called methods in juli components can invoke this method in order to avoid flooding the output when logging lasting error conditions. |
protected boolean |
getProperty(java.lang.String name,
boolean defaultValue)
Get an property value out of the LogManager by name. |
protected int |
getProperty(java.lang.String name,
int defaultValue)
Get an property value out of the LogManager by name. |
protected long |
getProperty(java.lang.String name,
long defaultValue)
Get an property value out of the LogManager by name. |
protected java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
Get an property value out of the LogManager by name. |
protected void |
resetErrorCount()
Called by derived classes when they deem that the component has recovered from an erroneous state. |
void |
setObjectStore(ObjectStore objectstore)
Set owning object repository for this component. This operation can only be performed once. Once set, the owning repository cannot be changed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final java.util.logging.Level INTERNAL_LOG_LEVEL
protected ObjectStore repository
protected final java.util.logging.LogManager manager
private static java.util.Map componentloggers
private int errorCount
private ExtendedLogger logger
| Constructor Detail |
public AbstractComponent()
| Method Detail |
public void setObjectStore(ObjectStore objectstore)
setObjectStore in interface Componentobjectstore - The repository where the configuration is storedpublic MessageProperties getMessageProperties()
getMessageProperties in interface Componentprotected ObjectStore getLoggerRepository()
ObjectStore this component is attached to.
protected void resetErrorCount()
static ExtendedLogger getLogger(java.lang.String name,
java.lang.String resourceBundle)
protected ExtendedLogger getLogger()
This logger always sends output to an ConsoleHandler,
which outputs to System.err
protected ExtendedLogger getNonFloodingLogger()
protected java.lang.String getProperty(java.lang.String name,
java.lang.String defaultValue)
LogManager by name.
name - of the parameter to be obtained.defaultValue - to return if no value has been found.
protected int getProperty(java.lang.String name,
int defaultValue)
LogManager by name.
name - of the parameter to be obtained.defaultValue - to return if no value has been found.
protected long getProperty(java.lang.String name,
long defaultValue)
LogManager by name.
name - of the parameter to be obtained.defaultValue - to return if no value has been found.
protected boolean getProperty(java.lang.String name,
boolean defaultValue)
LogManager by name.
name - of the parameter to be obtained.defaultValue - to return if no value has been found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||