|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.e2etrace.config.PropertiesTraceConfig
public class PropertiesTraceConfig
Properties file implementation of the e2etrace configuration.
The property file must be structured as follows:
global.enabletrace=true/false global.reloadinterval=<n> id.<trace step id>=true/falseIf a
reloadinterval
is defined in the configuration file, the
property file will be automatically reloaded every n seconds. If no reload
interval or an interval of 0 seconds is defined, the configuration will only
be loaded once.
The trace step ids must match the string representation of the id (see
ITraceStepId.asString()
). The default value for trace ids is
true
. That is, if no ids are defined in the configuration
file , tracing will be enabled for all trace steps.
Constructor Summary | |
---|---|
PropertiesTraceConfig()
Default constructor. |
Method Summary | |
---|---|
boolean |
isTraceEnabled()
Is tracing enabled at all? |
boolean |
isTraceEnabledForId(ITraceStepId id)
Is tracing enabled for the given trace step id? |
void |
loadConfigFile(String fileName)
Loads the e2etrace configuration from the specified properties file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesTraceConfig()
Method Detail |
---|
public boolean isTraceEnabled()
If this method returns false
e2etrace does not collect any
trace information. All potential time consuming methods of e2etrace will
immediately return.
isTraceEnabled
in interface ITraceConfig
public boolean isTraceEnabledForId(ITraceStepId id)
If this method returns false
for the given id, e2etrace does
not collect any trace information for this specific trace id. Basically,
this reduces the amount of collected data but not the general overhead of
the trace mechanismn itself.
Note: If tracing is disabled for a trace session id, no trace
data will be collected for the complete session.
isTraceEnabledForId
in interface ITraceConfig
id
- the trace id
public void loadConfigFile(String fileName) throws IOException
The following search order is used:
PropertiesTraceConfig
. If e2etrace is deployed as part of
an Java EE application, this loader should find all files that are part of
the ear/war file.
fileName
- path and name of the configuration file
IOException
- Error loading the specified file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |