Examples of DependencyInfo


Examples of org.jboss.dependency.spi.DependencyInfo

  
   protected void outputContext(ControllerContext context)
   {
      System.out.println(context.getName() + " " + context.getState());
     
      DependencyInfo di = context.getDependencyInfo();
     
      for (DependencyItem item : di.getUnresolvedDependencies(null))
      {
         System.out.println(item);
      }
   }
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

    * @param context the context
    * @param depends the dependencies
    */
   private void addDependencies(ServiceControllerContext context, Collection<ObjectName> depends)
   {
      DependencyInfo info = context.getDependencyInfo();
      for (ObjectName other : depends)
      {
         info.addIDependOn(new LifecycleDependencyItem(context.getName(), other.getCanonicalName(), ControllerState.CREATE));
         info.addIDependOn(new LifecycleDependencyItem(context.getName(), other.getCanonicalName(), ControllerState.START));
      }
   }
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

   public void addControllerContext(ControllerContext context) throws Throwable
   {
      JMX jmx = readJmxAnnotation(context);
      if (jmx != null)
      {
         DependencyInfo info = context.getDependencyInfo();
         info.addLifecycleCallback(new ServiceLifecycleCallback());
      }
   }
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

         BeanMetaData metaData = context.getBeanMetaData();
         BeanInfo info = configurator.getBeanInfo(metaData);
         context.setBeanInfo(info);

         // add custom dependencies (e.g. AOP layer).
         DependencyInfo depends =   context.getDependencyInfo();
         List dependencies = info.getDependencies();
         if (dependencies != null)
         {
            Iterator it = dependencies.iterator();
            while (it.hasNext())
            {
               AbstractDependencyItem dependency = new AbstractDependencyItem(metaData.getName(), it.next(), ControllerState.INSTANTIATED, ControllerState.INSTALLED);
               depends.addIDependOn(dependency);
            }
         }

      }
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

               buffer.append("\n*** DEPLOYMENTS MISSING DEPENDENCIES:\n");
               for (Iterator i = incomplete.iterator(); i.hasNext();)
               {
                  KernelControllerContext ctx = (KernelControllerContext) i.next();
                  buffer.append(ctx.getName()).append(" -> ");
                  DependencyInfo dependsInfo = ctx.getDependencyInfo();
                  Set depends = dependsInfo.getIDependOn(null);
                  for (Iterator j = depends.iterator(); j.hasNext();)
                  {
                     DependencyItem item = (DependencyItem) j.next();
                     buffer.append(item.getIDependOn()).append('{').append(item.getWhenRequired().getStateString());
                     buffer.append(':');
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

     
      if (trace)
         log.trace("Installing " + context.toShortString());

      context.setController(this);
      DependencyInfo dependencies = context.getDependencyInfo();
      if (trace)
         log.trace("Dependencies for " + name + ": " + dependencies.getIDependOn(null));

      if (incrementState(context, trace))
      {
         allContexts.put(context.getName(), context);
         resolveContexts(trace);
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

         for (Iterator i = contexts.iterator(); i.hasNext();)
         {
            ControllerContext ctx = (ControllerContext) i.next();
            if (advance(ctx))
            {
               DependencyInfo dependencies = ctx.getDependencyInfo();
               if (dependencies.resolveDependencies(this, state))
                  result.add(ctx);
            }
         }
      }
     
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

      Set fromContexts = (Set) contextsByState.get(fromState);
      if (fromContexts.remove(context) == false)
         throw new IllegalStateException("Context not found in previous state " + fromState.getStateString() + " context=" + context.toShortString());
     
      DependencyInfo dependencies = context.getDependencyInfo();
      Set dependsOnMe = dependencies.getDependsOnMe(null);
      if (dependsOnMe.isEmpty() == false)
      {
         for (Iterator i = dependsOnMe.iterator(); i.hasNext();)
         {
            DependencyItem item = (DependencyItem) i.next();
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

    *
    * @param context the other context
    */
   protected void addDependsOnMe(Controller controller, ControllerContext context)
   {
      DependencyInfo info = context.getDependencyInfo();
      if (info != null)
         info.addDependsOnMe(this);
   }
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

      {
         Object contextName = context.getName();
         String name = contextName.toString();
         Set<MissingDependency> dependencies = new HashSet<MissingDependency>();

         DependencyInfo dependsInfo = context.getDependencyInfo();
         ControllerState currentState = context.getState();
         ControllerState nextState = states.getNextState(currentState);

         for (DependencyItem item : dependsInfo.getUnresolvedDependencies(nextState))
         {
            if (item.isResolved() == false)
            {
               String dependency;
               ControllerState actualState = 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.