Examples of newLifecycle()


Examples of jfun.yan.lifecycle.DefaultLifecycleManager.newLifecycle()

        Components.useKey("real engine").singleton(new ThreadLocalScope());
      final DefaultLifecycleDescriptor desc = new DefaultLifecycleDescriptor();
      desc.setCloser(new Phase(desc.getCloser().getPhaseKey(), ExceptionHandlers.suppresser()));
      desc.setStopper(new Phase(desc.getStopper().getPhaseKey(), ExceptionHandlers.suppresser()));
      final DefaultLifecycleManager lm = new DefaultLifecycleManager(desc);
      final DefaultLifecycleManager.DefaultLifecycle lc = lm.newLifecycle()
      .starter("start")
      .stopper("stop")
      .initializer("initialize")
      .disposer("destroy");
      final Component engine_lc = lc.manage(real_engine);
View Full Code Here

Examples of jfun.yan.lifecycle.DefaultLifecycleManager.newLifecycle()

      Component c = Components.ctor(Automobile.class);
      c = man1.newLifecycle()
        .starter("start1")
        .stopper("stop1")
        .manage(c);
      c = man2.newLifecycle()
        .starter("start2")
        .stopper("stop2")
        .manage(c);
      Container yan = createYanContainer();
      yan.registerComponent("target", c);
View Full Code Here

Examples of jfun.yan.lifecycle.DefaultLifecycleManager.newLifecycle()

    throws Throwable{
      final Container yan = this.createYanContainer();
      final DefaultLifecycleManager man = new DefaultLifecycleManager();

      Component mybean = Components.bean(MyBean.class, new String[]{"1","short"});
      mybean = man.newLifecycle()
      .verifier("verify")
      .manage(mybean);
      yan.registerValue(new Short((short)1));
      yan.registerValue(Boolean.valueOf(true));
      yan.registerComponent("target", mybean);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.