Class InheritableThreadLocalPentahoRequestContextHolderStrategy
- java.lang.Object
-
- org.pentaho.platform.engine.core.system.InheritableThreadLocalPentahoRequestContextHolderStrategy
-
- All Implemented Interfaces:
org.pentaho.platform.api.engine.IPentahoRequestContextHolderStrategy
public class InheritableThreadLocalPentahoRequestContextHolderStrategy extends Object implements org.pentaho.platform.api.engine.IPentahoRequestContextHolderStrategy
AnInheritableThreadLocal
-based implementation ofIPentahoRequestContextHolderStrategy
.- Author:
- rmansoor
-
-
Constructor Summary
Constructors Constructor Description InheritableThreadLocalPentahoRequestContextHolderStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.pentaho.platform.api.engine.IPentahoRequestContext
getRequestContext()
Returns the IPentahoRequestContext for the current threadvoid
removeRequestContext()
Removes the IPentahoRequestContext for the current thread.void
setRequestContext(org.pentaho.platform.api.engine.IPentahoRequestContext requestContext)
Sets an IPentahoRequestContext for the current thread
-
-
-
Method Detail
-
setRequestContext
public void setRequestContext(org.pentaho.platform.api.engine.IPentahoRequestContext requestContext)
Sets an IPentahoRequestContext for the current thread- Specified by:
setRequestContext
in interfaceorg.pentaho.platform.api.engine.IPentahoRequestContextHolderStrategy
- Parameters:
requestContext
-
-
getRequestContext
public org.pentaho.platform.api.engine.IPentahoRequestContext getRequestContext()
Returns the IPentahoRequestContext for the current thread- Specified by:
getRequestContext
in interfaceorg.pentaho.platform.api.engine.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 interfaceorg.pentaho.platform.api.engine.IPentahoRequestContextHolderStrategy
-
-