Class HybrisThreadInit

java.lang.Object
de.hybris.platform.cockpit.util.HybrisThreadInit
All Implemented Interfaces:
org.zkoss.zk.ui.event.EventThreadInit

public class HybrisThreadInit extends Object implements org.zkoss.zk.ui.event.EventThreadInit
Helper class which is used to transfer any hybris specific threalocal settings from ZK's main servlet thread to ZK's event processing threads. (Since ZK is multi-threaded!)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    init(org.zkoss.zk.ui.Component comp, org.zkoss.zk.ui.event.Event event)
    Activates hybris specific threadlocal settings inside the zk event processing thread.
    void
    prepare(org.zkoss.zk.ui.Component comp, org.zkoss.zk.ui.event.Event event)
    Grabs hybris specific threadlocal settings and stores them within this object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HybrisThreadInit

      public HybrisThreadInit()
  • Method Details

    • prepare

      public void prepare(org.zkoss.zk.ui.Component comp, org.zkoss.zk.ui.event.Event event) throws Exception
      Grabs hybris specific threadlocal settings and stores them within this object. By now is saves the main thread's tenant and jalo session. This is possible since this method is called from zk main thread.
      Specified by:
      prepare in interface org.zkoss.zk.ui.event.EventThreadInit
      Throws:
      Exception
    • init

      public boolean init(org.zkoss.zk.ui.Component comp, org.zkoss.zk.ui.event.Event event) throws Exception
      Activates hybris specific threadlocal settings inside the zk event processing thread. By now it restores the main thread's tenant and jalo session. Requires prepare(Component, Event) being called before!
      Specified by:
      init in interface org.zkoss.zk.ui.event.EventThreadInit
      Throws:
      Exception