Class InheritableThreadLocalPentahoRequestContextHolderStrategy

  • All Implemented Interfaces:
    org.pentaho.platform.api.engine.IPentahoRequestContextHolderStrategy

    public class InheritableThreadLocalPentahoRequestContextHolderStrategy
    extends Object
    implements org.pentaho.platform.api.engine.IPentahoRequestContextHolderStrategy
    An InheritableThreadLocal-based implementation of IPentahoRequestContextHolderStrategy.
    Author:
    rmansoor
    • Constructor Detail

      • InheritableThreadLocalPentahoRequestContextHolderStrategy

        public InheritableThreadLocalPentahoRequestContextHolderStrategy()
    • Method Detail

      • setRequestContext

        public void setRequestContext​(org.pentaho.platform.api.engine.IPentahoRequestContext requestContext)
        Sets an IPentahoRequestContext for the current thread
        Specified by:
        setRequestContext in interface org.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 interface org.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 interface org.pentaho.platform.api.engine.IPentahoRequestContextHolderStrategy