Examples of InhabitantActivator


Examples of org.jvnet.hk2.component.InhabitantActivator

   * by ourself.
   *
   * @return an InhabitantActivator, defaulting to ourself
   */
  protected InhabitantActivator getInhabitantActivator() {
    InhabitantActivator ia = habitat.getComponent(InhabitantActivator.class, getName());
    if (null == ia) {
      ia = habitat.getByContract(InhabitantActivator.class);
    }
    return (null == ia) ? this : ia;
  }
View Full Code Here

Examples of org.jvnet.hk2.component.InhabitantActivator

          logger.log(Level.FINER, "sorting {0}", activations);
        }
        activations = is.sort(activations);
        assert(null != activations);
       
        InhabitantActivator ia = getInhabitantActivator();
        for (Inhabitant<?> rli : activations) {
          if (logger.isLoggable(Level.FINER)) {
            logger.log(Level.FINER, "activating {0} - " + getDescription(true), rli);
          }
       
          try {
            ia.activate(rli);
  //        assert(rli.isInstantiated());
           
            // an escape hatch if we've been interrupted in some way
            checkInterrupt(null, rli, null);
          } catch (Exception e) {
View Full Code Here

Examples of org.jvnet.hk2.component.InhabitantActivator

        if (null != downRecorder) {
          // Causes release of the entire activationSet.  Release occurs in the inverse
          // order of the recordings.  So A->B->C will have startUp ordering be (C,B,A)
          // because of dependencies.  The shutdown ordering will b (A,B,C).

          InhabitantActivator ia = getInhabitantActivator();
         
          Inhabitant<?> i;
          while (null != (i = downRecorder.pop())) {
            if (logger.isLoggable(Level.FINER)) {
              logger.log(Level.FINER, "releasing {0} - " + getDescription(true), i);
            }
           
            try{
              ia.deactivate(i);
//              assert(!i.isInstantiated());
              checkInterrupt(null, i, null);
            } catch (Exception e) {
              checkInterrupt(e, i, null);
            }
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.