Package org.jboss.dependency.spi

Examples of org.jboss.dependency.spi.DependencyInfo


      ControllerState dependent = null;
      if (dependentState != null)
         dependent = ControllerState.getInstance(dependentState);

      DependencyInfo di = targetControllerContext.getDependencyInfo();
      for (Object dependency : dependencies)
      {
         DependencyItem item = new AbstractDependencyItem(targetName, dependency, whenRequired, dependent);
         di.addIDependOn(item);
      }
   }
View Full Code Here


  
   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

    * @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

   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

         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

               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

     
      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

         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

      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

    *
    * @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

TOP

Related Classes of org.jboss.dependency.spi.DependencyInfo

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.