Examples of DependencyInfo


Examples of org.jboss.dependency.spi.DependencyInfo

         contextsInError.put(context.getName().toString(), getRootCause(context.getError()));
      else
      {
         String name = context.getName().toString();
         Set<MissingDependency> dependencies = new HashSet<MissingDependency>();
         DependencyInfo dependsInfo = context.getDependencyInfo();
         for (DependencyItem item : dependsInfo.getIDependOn(null))
         {
            if (item.isResolved() == false)
            {
               String dependency;
               ControllerState actualState = null;
View Full Code Here

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(ClassContextDependencyItem.class);
         dependencys.addAll(dependencyInfo.getIDependOn(CallbackDependencyItem.class));
         for (DependencyItem di : dependencys)
         {
            // can cast because of getIDepend method impl
            ClassDependencyItem cdi = (ClassDependencyItem)di;
            cdi.clear(getController());
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

Examples of org.jboss.dependency.spi.DependencyInfo

         contextsInError.put(context.getName().toString(), getRootCause(context.getError()));
      else
      {
         String name = context.getName().toString();
         Set<MissingDependency> dependencies = new HashSet<MissingDependency>();
         DependencyInfo dependsInfo = context.getDependencyInfo();
         for (DependencyItem item : dependsInfo.getIDependOn(null))
         {
            if (item.isResolved() == false)
            {
               String dependency;
               ControllerState actualState = null;
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)
         {
            String dependsOn = "[]";
            if (dependencies != null)
            {
               try
               {
                  Set<DependencyItem> set = dependencies.getIDependOn(null);
                  if (set != null)
                     dependsOn = set.toString();
               }
               catch (Throwable t)
               {
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

      {
         for (ControllerContext ctx : contexts)
         {
            if (advance(ctx))
            {
               DependencyInfo dependencies = ctx.getDependencyInfo();
               try
               {
                  if (dependencies == null || dependencies.resolveDependencies(this, state))
                     result.add(ctx);
               }
               catch (Throwable error)
               {
                  log.error("Error resolving dependencies for " + state.getStateString() + ": " + ctx.toShortString(), error);
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

      Set<ControllerContext> fromContexts = fromController.getContextsByState(fromState);
      if (fromContexts == null || fromContexts.remove(context) == false)
         throw new Error("INTERNAL ERROR: context not found in previous state " + fromState.getStateString() + " context=" + context.toShortString(), new Exception("STACKTRACE"));

      DependencyInfo dependencies = context.getDependencyInfo();
      if (dependencies != null)
      {
         try
         {
            Set<DependencyItem> dependsOnMe = dependencies.getDependsOnMe(null);
            if (dependsOnMe.isEmpty() == false)
            {
               for (DependencyItem item : dependsOnMe)
               {
                  if (item.isResolved())
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

    * @param isInstallPhase install or uninstall phase
    * @return callback items from dependency info
    */
   protected Set<CallbackItem<?>> getDependencyCallbacks(ControllerContext context, boolean isInstallPhase)
   {
      DependencyInfo di = context.getDependencyInfo();
      if (di != null)
      {
         return isInstallPhase ? di.getInstallItems() : di.getUninstallItems();
      }
      return null;
   }
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

         resolveCallbacks(installs, state, isInstallPhase, isInstallPhase, true);
         Set<CallbackItem<?>> uninstalls = getDependencyCallbacks(context, false);
         resolveCallbacks(uninstalls, state, isInstallPhase == false, isInstallPhase, false);

         // change callbacks, applied only if context is autowire candidate
         DependencyInfo dependencyInfo = context.getDependencyInfo();
         if (dependencyInfo != null && dependencyInfo.isAutowireCandidate())
         {
            // match callbacks by name
            Set<CallbackItem<?>> existingCallbacks = getCallbacks(context.getName(), isInstallPhase);
            // match by classes
            Collection<Class<?>> classes = getClassesImplemented(context.getTarget());
View Full Code Here

Examples of org.jboss.dependency.spi.DependencyInfo

    * @param install is it install or uninstall
    * @throws Throwable for any error
    */
   protected void handleLifecycleCallbacks(ControllerContext context, ControllerState state, boolean install) throws Throwable
   {
      DependencyInfo di = context.getDependencyInfo();
      if (di != null)
      {
         List<LifecycleCallbackItem> callbacks = di.getLifecycleCallbacks();
         for (LifecycleCallbackItem callback : callbacks)
         {
            if (callback.getWhenRequired().equals(state))
            {
               if (install)
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.