|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.e2etrace.trace.NoopTraceSession
public class NoopTraceSession
NOOP implementation of a trace session (does nothing).
This trace session is internally used if tracing is switched off in the e2etrace configuration.
| Constructor Summary | |
|---|---|
NoopTraceSession()
|
|
| Method Summary | |
|---|---|
void |
enterStep(Class clazz,
String method)
Wrapper for ITraceSession.enterStep(ITraceStepId) using a
MethodTraceStepId as TraceStep-IDs. |
void |
enterStep(ITraceStepId id)
Enters a new trace step with the supplied id. |
void |
enterStep(String id)
Wrapper for ITraceSession.enterStep(ITraceStepId) using a String as
TraceStep-IDs. |
ITraceConfig |
getConfig()
Returns the trace configuration of the session. |
ITraceStep |
getCurrentStep()
Returns the active trace step. |
long |
getDuration()
Returns the execution time of the complete trace session. |
ITraceStep |
getRootStep()
Returns the the root step. |
void |
leaveStep(Class clazz,
String method)
Wrapper for ITraceSession.leaveStep(ITraceStepId) using a
MethodTraceStepId as TraceStep-IDs. |
void |
leaveStep(ITraceStepId id)
Leaves the trace step with the given id. |
void |
leaveStep(String id)
Wrapper for ITraceSession.leaveStep(ITraceStepId) using a String as
TraceStep-IDs. |
void |
setConfig(ITraceConfig tc)
Assigns a new trace configuratio to the trace session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NoopTraceSession()
| Method Detail |
|---|
public void enterStep(ITraceStepId id)
In reality, a trace step covers for example the execution of a single
method. In this case, enterStep must be called when the
method starts and leaveStep when the method ends.
To get exact results, each call of enterStep should be
matched by a corresponding call of leaveStep. A trace
session can handle missing leaveStep calls. In this case,
leaveStep will be automatically invoked when the parent step
ends (if any). If no parent exists, no duration will be calculated.
enterStep in interface ITraceSessionid - ID of the trace steppublic void leaveStep(ITraceStepId id)
leaveStep in interface ITraceSessionid - ID of the trace steppublic ITraceStep getRootStep()
The root step is the step that covers the complete service call (i.e. that has no parent step). The id of the root step is used as id for the complete trace session.
getRootStep in interface ITraceSessionpublic long getDuration()
Normally for each service call a separate trace session exist. So the returned duration is the overall execution time of the service call.
getDuration in interface ITraceSessionpublic void setConfig(ITraceConfig tc)
setConfig in interface ITraceSessiontc - trace configurationpublic ITraceConfig getConfig()
getConfig in interface ITraceSessionpublic ITraceStep getCurrentStep()
The active trace step is determined by the last call to
enterStep. If enterStep has not been called
yet, the method returns the root step of the trace session (see
getRootStep).
getCurrentStep in interface ITraceSession
public void enterStep(Class clazz,
String method)
ITraceSession.enterStep(ITraceStepId) using a
MethodTraceStepId as TraceStep-IDs.
enterStep in interface ITraceSessionclazz - Class instance to which the method belongsmethod - Name of the executed methodpublic void enterStep(String id)
ITraceSession.enterStep(ITraceStepId) using a String as
TraceStep-IDs.
enterStep in interface ITraceSessionid - String used as id
public void leaveStep(Class clazz,
String method)
ITraceSession.leaveStep(ITraceStepId) using a
MethodTraceStepId as TraceStep-IDs.
leaveStep in interface ITraceSessionclazz - Class instance to which the method belongsmethod - Name of the executed methodpublic void leaveStep(String id)
ITraceSession.leaveStep(ITraceStepId) using a String as
TraceStep-IDs.
leaveStep in interface ITraceSessionid - String used as id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||