org.e2etrace.trace
Class DefaultTraceSessionManager

java.lang.Object
  extended by org.e2etrace.trace.AbstractTraceSessionManager
      extended by org.e2etrace.trace.DefaultTraceSessionManager
All Implemented Interfaces:
ITraceSessionManager

public class DefaultTraceSessionManager
extends AbstractTraceSessionManager

Default implementation of a trace session manager.

This simple trace session manager maintains a single trace session. Hence, it is only suitable for monitoring sequential service execution in an application. This approach does not work in application server environments!

This class implements the singleton pattern.

Author:
Gunther Popp

Method Summary
protected  void assignCurrentSession(ITraceSession session)
          CALL-BACK: Forward a newly assigned current trace session to sub-classes.
static DefaultTraceSessionManager getInstance()
          Returns the singleton instance of the session manager.
 void releaseCurrentSession()
          Release current session.
protected  ITraceSession requestCurrentSession()
          CALL-BACK: Request the current trace session from sub-classes.
 
Methods inherited from class org.e2etrace.trace.AbstractTraceSessionManager
getConfig, getCurrentSession, setConfig, setCurrentSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DefaultTraceSessionManager getInstance()
Returns the singleton instance of the session manager.

Returns:
trace session manager

requestCurrentSession

protected ITraceSession requestCurrentSession()
CALL-BACK: Request the current trace session from sub-classes.

This call-back is triggered for every invokation of getCurrentSession.

Specified by:
requestCurrentSession in class AbstractTraceSessionManager
Returns:
current (active) trace session

assignCurrentSession

protected void assignCurrentSession(ITraceSession session)
CALL-BACK: Forward a newly assigned current trace session to sub-classes.

This call-back is triggered for every invokation of setCurrentSession.

Specified by:
assignCurrentSession in class AbstractTraceSessionManager
Parameters:
session - new current (active) trace session

releaseCurrentSession

public void releaseCurrentSession()
Release current session.

This call releases the reference to the current trace session. It should be called in when all trace data for the current trace session has been collected and the session is no longer needed.



Copyright © 2013 Gunther Popp. All Rights Reserved.