Package org.jboss.dependency.spi

Examples of org.jboss.dependency.spi.ControllerState


    */
   protected abstract void addCallback(MetaDataVisitor visitor, CallbackItem<?> callback);

   public void describeVisit(MetaDataVisitor vistor)
   {
      ControllerState whenRequired = getState();
      try
      {
         KernelControllerContext context = vistor.getControllerContext();
         CallbackItem<?> callback;
         if (property != null)
View Full Code Here


   }

   protected AbstractCallbackMetaData createCallback(FieldInfo info, Install annotation)
   {
      InstallCallbackMetaData callback = new InstallCallbackMetaData();
      callback.setState(new ControllerState(annotation.whenRequired()));
      callback.setDependentState(new ControllerState(annotation.dependentState()));
      if (isAttributePresent(annotation.cardinality()))
         callback.setCardinality(Cardinality.fromString(annotation.cardinality()));
      applyInfo(callback, info);
      return callback;
   }
View Full Code Here

      boolean isInnerBean = visitor.visitorNodeStack().isEmpty() == false;
      if (isInnerBean)
      {
         Object name = ctx.getName();
         Object iDependOn = getUnderlyingValue();
         ControllerState whenRequired = visitor.getContextState();
         DependencyItem di = new AbstractDependencyItem(name, iDependOn, whenRequired, ControllerState.INSTALLED);
         visitor.addDependency(di);
      }
      if (create != null && create.getMethodName() == null)
         create.setMethodName("create");
View Full Code Here

      return strategy.getContext(controller, name, state);
   }

   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
   {
      ControllerState state = dependentState;
      if (state == null)
         state = ControllerState.INSTALLED;
      if (context == null)
         throw new IllegalStateException("No context for " + this);
View Full Code Here

      if (search == null)
         throw new IllegalArgumentException("Null search");

      context = visitor.getControllerContext();

      ControllerState whenRequired = whenRequiredState;
      if (whenRequired == null)
      {
         whenRequired = visitor.getContextState();
      }
View Full Code Here

   {
      // we're here, so it must be GraphController instance
      Controller controller = context.getController();
      GraphController gc = (GraphController)controller;

      ControllerState dependentState = state;
      if (dependentState == null)
         dependentState = ControllerState.INSTALLED;
      ControllerContext context = gc.getContext(getUnderlyingValue(), dependentState, search);

      Object result;
View Full Code Here

   public void describeVisit(MetaDataVisitor visitor)
   {
      Object name = context.getName();
      Object iDependOn = getUnderlyingValue();

      ControllerState whenRequired = visitor.getContextState();
      ControllerState dependentState = state;
      if (dependentState == null)
         dependentState = ControllerState.INSTALLED;

      DependencyItem item = new SearchDependencyItem(name, iDependOn, whenRequired, dependentState, search);
      visitor.addDependency(item);
View Full Code Here

    * @param transformer the transformer
    * @return the builder
    */
   public BeanMetaDataBuilder addDemand(Object demand, String whenRequired, String transformer)
   {
      ControllerState whenRequiredState = null;
      if (whenRequired != null)
         whenRequiredState = new ControllerState(whenRequired);
      return addDemand(demand, whenRequiredState, transformer);
   }
View Full Code Here

   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
   {
      // controller context property injection
      if (fromContext != null)
      {
         ControllerState state = dependentState;
         if (state == null)
            state = ControllerState.INSTANTIATED;

         ControllerContext lookup = getControllerContext(getUnderlyingValue(), state);
         if (lookup == null)
View Full Code Here

                  {
                     TypeProvider typeProvider = (TypeProvider)node;
                     Class<?> injectionClass = typeProvider.getType(visitor, this).getType();
                     log.debug(context.getName() + ": Contextual injection usage (class -> classloader): " + injectionClass + " -> " + SecurityActions.getClassLoader(injectionClass) + " defined by " + node);
                     // set when required
                     ControllerState whenRequired = whenRequiredState;
                     if (whenRequired == null)
                     {
                        whenRequired = visitor.getContextState();
                     }
                     DependencyItem item = new SearchClassContextDependencyItem(
View Full Code Here

TOP

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

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.