Class HybrisThreadInit

  • All Implemented Interfaces:
    org.zkoss.zk.ui.event.EventThreadInit

    public class HybrisThreadInit
    extends java.lang.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!)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 Detail

      • HybrisThreadInit

        public HybrisThreadInit()
    • Method Detail

      • prepare

        public void prepare​(org.zkoss.zk.ui.Component comp,
                            org.zkoss.zk.ui.event.Event event)
                     throws java.lang.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:
        java.lang.Exception
      • init

        public boolean init​(org.zkoss.zk.ui.Component comp,
                            org.zkoss.zk.ui.event.Event event)
                     throws java.lang.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:
        java.lang.Exception