at.gv.egovernment.moa.logging
Class LoggingContextManager

java.lang.Object
  |
  +--at.gv.egovernment.moa.logging.LoggingContextManager

public class LoggingContextManager
extends Object

Provides each thread with a single instance of LoggingContext.

Version:
$Id$
Author:
Patrick Peck

Constructor Summary
protected LoggingContextManager()
          Creates a new LoggingContextManager.
 
Method Summary
static LoggingContextManager getInstance()
          Get the single instance of the LoggingContextManager class.
 LoggingContext getLoggingContext()
          Return the LoggingContext for the current thread.
 void setLoggingContext(LoggingContext ctx)
          Set the LoggingContext context for the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingContextManager

protected LoggingContextManager()
Creates a new LoggingContextManager. Protected to disallow direct instantiation.
Method Detail

getInstance

public static LoggingContextManager getInstance()
Get the single instance of the LoggingContextManager class.
Returns:
LoggingContextManager The single instance.

setLoggingContext

public void setLoggingContext(LoggingContext ctx)
Set the LoggingContext context for the current thread.
Parameters:
ctx - The LoggingContext for the current thread.

getLoggingContext

public LoggingContext getLoggingContext()
Return the LoggingContext for the current thread.
Returns:
LoggingContext The LoggingContext for the current thread, or null if none has been set.