|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITraceSession
A trace session manages all trace steps for a single service call.
The id of a trace session is the id of the root step (see
getRootStep
). This id can be used to deactivate tracing on a
per-session basis (see ITraceConfig
).
Method Summary | |
---|---|
void |
enterStep(Class clazz,
String method)
Wrapper for 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 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 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 leaveStep(ITraceStepId) using a String as
TraceStep-IDs. |
void |
setConfig(ITraceConfig tc)
Assigns a new trace configuratio to the trace session. |
Method Detail |
---|
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.
id
- ID of the trace stepvoid leaveStep(ITraceStepId id)
id
- ID of the trace stepvoid enterStep(Class clazz, String method)
enterStep(ITraceStepId)
using a
MethodTraceStepId
as TraceStep-IDs.
clazz
- Class instance to which the method belongsmethod
- Name of the executed methodvoid leaveStep(Class clazz, String method)
leaveStep(ITraceStepId)
using a
MethodTraceStepId
as TraceStep-IDs.
clazz
- Class instance to which the method belongsmethod
- Name of the executed methodvoid enterStep(String id)
enterStep(ITraceStepId)
using a String as
TraceStep-IDs.
id
- String used as idvoid leaveStep(String id)
leaveStep(ITraceStepId)
using a String as
TraceStep-IDs.
id
- String used as idITraceStep 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.
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
).
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.
void setConfig(ITraceConfig tc)
tc
- trace configurationITraceConfig getConfig()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |