org.pentaho.platform.engine.core.system
Class InheritableThreadLocalPentahoRequestContextHolderStrategy

java.lang.Object
  extended by org.pentaho.platform.engine.core.system.InheritableThreadLocalPentahoRequestContextHolderStrategy
All Implemented Interfaces:
IPentahoRequestContextHolderStrategy

public class InheritableThreadLocalPentahoRequestContextHolderStrategy
extends Object
implements IPentahoRequestContextHolderStrategy

An InheritableThreadLocal-based implementation of IPentahoRequestContextHolderStrategy.

Author:
rmansoor

Constructor Summary
InheritableThreadLocalPentahoRequestContextHolderStrategy()
           
 
Method Summary
 IPentahoRequestContext getRequestContext()
          Returns the IPentahoRequestContext for the current thread
 void removeRequestContext()
          Removes the IPentahoRequestContext for the current thread.
 void setRequestContext(IPentahoRequestContext requestContext)
          Sets an IPentahoRequestContext for the current thread
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InheritableThreadLocalPentahoRequestContextHolderStrategy

public InheritableThreadLocalPentahoRequestContextHolderStrategy()
Method Detail

setRequestContext

public void setRequestContext(IPentahoRequestContext requestContext)
Sets an IPentahoRequestContext for the current thread

Specified by:
setRequestContext in interface IPentahoRequestContextHolderStrategy
Parameters:
requestContext -

getRequestContext

public IPentahoRequestContext getRequestContext()
Returns the IPentahoRequestContext for the current thread

Specified by:
getRequestContext in interface IPentahoRequestContextHolderStrategy
Returns:
thread requestContext

removeRequestContext

public void removeRequestContext()
Removes the IPentahoRequestContext for the current thread. It is important that the framework calls this to prevent request context bleed- through between requests as threads are re-used by the server.

Specified by:
removeRequestContext in interface IPentahoRequestContextHolderStrategy