Package org.huihoo.willow

Examples of org.huihoo.willow.LifecycleListener


    }
    // Add this LifecycleListener to our associated component
    Lifecycle lifecycle = (Lifecycle) digester.peek();
   
    Class clazz = lifecycle.getClass().getClassLoader().loadClass(className);
    LifecycleListener listener = (LifecycleListener) clazz.newInstance();     
    lifecycle.addLifecycleListener(listener);
  }
View Full Code Here


  public void addLifecycleListener(LifecycleListener listener)
  {

    synchronized (listeners)
    {
      LifecycleListener results[] = new LifecycleListener[listeners.length + 1];
      for (int i = 0; i < listeners.length; i++)
        results[i] = listeners[i];
      results[listeners.length] = listener;
      listeners = results;
    }
View Full Code Here

   */
  public void fireLifecycleEvent(String type, Object data)
  {

    LifecycleEvent event = new LifecycleEvent(lifecycle, type, data);
    LifecycleListener interested[] = null;
    synchronized (listeners)
    {
      interested = (LifecycleListener[]) listeners.clone();
    }
    for (int i = 0; i < interested.length; i++)
View Full Code Here

          break;
        }
      }
      if (n < 0)
        return;
      LifecycleListener results[] = new LifecycleListener[listeners.length - 1];
      int j = 0;
      for (int i = 0; i < listeners.length; i++)
      {
        if (i != n)
          results[j++] = listeners[i];
View Full Code Here

      context.setName(contextName);
      context.setAppBase(appBase);
      if (context instanceof Lifecycle)
      {
        clazz = Class.forName(engine.getConfigClass());
        LifecycleListener listener = (LifecycleListener) clazz.newInstance();
        ((Lifecycle) context).addLifecycleListener(listener);
      }

      engine.addChild(context);
    }
View Full Code Here

TOP

Related Classes of org.huihoo.willow.LifecycleListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.