Class InheritableThreadLocalPentahoSessionHolderStrategy
- java.lang.Object
-
- org.pentaho.platform.engine.core.system.InheritableThreadLocalPentahoSessionHolderStrategy
-
- All Implemented Interfaces:
IPentahoSessionHolderStrategy
public class InheritableThreadLocalPentahoSessionHolderStrategy extends Object implements IPentahoSessionHolderStrategy
AnInheritableThreadLocal
-based implementation ofIPentahoSessionHolderStrategy
.- Author:
- mlowery
-
-
Constructor Summary
Constructors Constructor Description InheritableThreadLocalPentahoSessionHolderStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.pentaho.platform.api.engine.IPentahoSession
getSession()
Returns the IPentahoSession for the current threadvoid
removeSession()
Removes the IPentahoSession for the current thread.void
setSession(org.pentaho.platform.api.engine.IPentahoSession session)
Sets an IPentahoSession for the current thread
-
-
-
Method Detail
-
setSession
public void setSession(org.pentaho.platform.api.engine.IPentahoSession session)
Sets an IPentahoSession for the current thread- Specified by:
setSession
in interfaceIPentahoSessionHolderStrategy
- Parameters:
session
-
-
getSession
public org.pentaho.platform.api.engine.IPentahoSession getSession()
Returns the IPentahoSession for the current thread- Specified by:
getSession
in interfaceIPentahoSessionHolderStrategy
- Returns:
- thread session
-
removeSession
public void removeSession()
Removes the IPentahoSession for the current thread. It is important that the framework calls this to prevent session bleed- through between requests as threads are re-used by the server.- Specified by:
removeSession
in interfaceIPentahoSessionHolderStrategy
-
-