Package org.jboss.dependency.spi

Examples of org.jboss.dependency.spi.DependencyInfo


      return accessContext;
   }

   private void removeClassContextReference()
   {
      DependencyInfo dependencyInfo = getDependencyInfo();
      if (dependencyInfo != null)
      {
         // remove all dependency items that hold class ref
         Set<DependencyItem> dependencys = dependencyInfo.getIDependOn(ClearableDependencyItem.class);
         dependencys.addAll(dependencyInfo.getIDependOn(ClearableDependencyItem.class));
         for (DependencyItem di : dependencys)
         {
            // can cast because of getIDepend method impl
            ClearableDependencyItem cdi = (ClearableDependencyItem)di;
            cdi.clear(getController());
View Full Code Here


public class AutowireAction extends InstallsAwareAction
{
   protected void installActionInternal(KernelControllerContext context) throws Throwable
   {
      KernelController controller = (KernelController)context.getController();
      DependencyInfo dependencyInfo = context.getDependencyInfo();
      if (dependencyInfo != null && dependencyInfo.isAutowireCandidate())
         controller.addInstantiatedContext(context);
   }
View Full Code Here

   protected void uninstallActionInternal(KernelControllerContext context)
   {
      try
      {
         KernelController controller = (KernelController)context.getController();
         DependencyInfo dependencyInfo = context.getDependencyInfo();
         if (dependencyInfo != null && dependencyInfo.isAutowireCandidate())
            controller.removeInstantiatedContext(context);
      }
      catch (Throwable ignored)
      {
         log.debugf(ignored, "Ignored error unsetting context ");
View Full Code Here

           
            // handle custom annotations
            applyAnnotations(context);
         }

         DependencyInfo dependencyInfo = context.getDependencyInfo();
         if (dependencyInfo != null && dependencyInfo.isAutowireCandidate())
            controller.addInstantiatedContext(context);
      }
      catch (Throwable t)
      {
         uninstall(context);
View Full Code Here

   protected void uninstallActionInternal(KernelControllerContext context)
   {
      KernelController controller = (KernelController)context.getController();
      try
      {
         DependencyInfo dependencyInfo = context.getDependencyInfo();
         if (dependencyInfo != null && dependencyInfo.isAutowireCandidate())
            controller.removeInstantiatedContext(context);
      }
      catch (Throwable ignored)
      {
         log.debugf(ignored, "Ignored error unsetting context ");
View Full Code Here

               buffer.append("\nDEPLOYMENTS MISSING DEPENDENCIES:\n");
               for (ControllerContext ctx : incomplete)
               {
                  Object name = ctx.getName();
                  buffer.append(String.format("  Deployment \"%s\" is missing the following dependencies:\n", name));
                  DependencyInfo dependsInfo = ctx.getDependencyInfo();
                  Set<DependencyItem> depends = dependsInfo.getIDependOn(null);
                  for (DependencyItem item : depends)
                  {
                     ControllerState dependentState = item.getDependentState();
                     if (dependentState == null)
                        dependentState = ControllerState.INSTALLED;
View Full Code Here

               buffer.append("\nDEPLOYMENTS MISSING DEPENDENCIES:\n");
               for (ControllerContext ctx : incomplete)
               {
                  Object name = ctx.getName();
                  buffer.append(String.format("  Deployment \"%s\" is missing the following dependencies:\n", name));
                  DependencyInfo dependsInfo = ctx.getDependencyInfo();
                  Set<DependencyItem> depends = dependsInfo.getIDependOn(null);
                  for (DependencyItem item : depends)
                  {
                     ControllerState dependentState = item.getDependentState();
                     if (dependentState == null)
                        dependentState = ControllerState.INSTALLED;
View Full Code Here

      {
         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

            {
               buffer.append("\n*** DEPLOYMENTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}\n");
               for (ControllerContext ctx : incomplete)
               {
                  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

      return ElementType.METHOD == type;
   }

   protected boolean isMetaDataAlreadyPresent(T info, C annotation, KernelControllerContext context)
   {
      DependencyInfo dependency = context.getDependencyInfo();
      Set<CallbackItem<?>> callbacks = getCallbacks(dependency);
      if (callbacks != null && callbacks.isEmpty() == false)
      {
         for(CallbackItem<?> ci : callbacks)
         {
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.