Examples of ControllerState


Examples of appeng.api.networking.pathing.ControllerState

  }

  private void recalcController()
  {
    recalculateControllerNextTick = false;
    ControllerState old = controllerState;

    if ( controllers.isEmpty() )
    {
      controllerState = ControllerState.NO_CONTROLLER;
    }
View Full Code Here

Examples of com.ardor3d.input.ControllerState

import com.google.common.base.Predicate;

public final class AnyControllerCondition implements Predicate<TwoInputStates> {

    public boolean apply(final TwoInputStates states) {
        final ControllerState oldState = states.getPrevious().getControllerState();
        final ControllerState currentState = states.getCurrent().getControllerState();

        final boolean apply = !oldState.equals(currentState);
        return apply;
    }
View Full Code Here

Examples of org.apache.torque.generator.control.ControllerState

            options.setGlobalOption(optionWithSpecialChars);
        }

        UnitConfiguration unitConfiguration = new UnitConfiguration();
        unitConfiguration.setOptions(options);
        ControllerState controllerState = new ControllerState();
        controllerState.setUnitConfiguration(unitConfiguration);
        tokenReplacer = new TokenReplacer(controllerState);
    }
View Full Code Here

Examples of org.jboss.dependency.spi.ControllerState

      Throwable error = targetControllerContext.getError();
      if (error != null)
         throw new IllegalArgumentException("Target bean " + targetName + " is in Error state: " + error);

      ControllerState whenRequired;
      if (whenRequiredState == null)
         whenRequired = ControllerState.INSTALLED;
      else
         whenRequired = ControllerState.getInstance(whenRequiredState);

      ControllerState currentTargetState = targetControllerContext.getState();
      if (controller.getStates().isBeforeState(currentTargetState, whenRequired) == false)
         throw new IllegalArgumentException("Target bean " + targetName + " is already past " + whenRequiredState + " state: " + targetControllerContext);

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

      DependencyInfo di = targetControllerContext.getDependencyInfo();
      for (Object dependency : dependencies)
View Full Code Here

Examples of org.jboss.dependency.spi.ControllerState

      KernelController controller = kernel.getController();
      ControllerContext context = controller.getContext(name, null);
      if (context == null)
         throw new IllegalStateException("Context not installed: " + name);

      ControllerState state = context.getState();
      return state.getStateString();
   }
View Full Code Here

Examples of org.jboss.dependency.spi.ControllerState

      KernelController controller = kernel.getController();
      ControllerContext context = controller.getContext(name, null);
      if (context == null)
         throw new IllegalStateException("Context not installed: " + name);
     
      ControllerState requiredState = null;
      // FIXME
      if(context instanceof KernelRegistryEntry == false)
         requiredState = context.getRequiredState();
      return mapper.map(context.getState().getStateString(), requiredState != null ? requiredState.getStateString() : null);
   }
View Full Code Here

Examples of org.jboss.dependency.spi.ControllerState

      if(name == null)
         throw new IllegalArgumentException("null name");
      if(mapper == null)
         throw new IllegalArgumentException("null mapper");

      ControllerState current = ControllerState.NOT_INSTALLED;
     
      try
      {
         if (mbeanServer.isRegistered(new ObjectName(name.toString())))
            current = ControllerState.INSTALLED;
      }
      catch (Exception e)
      {
         // Failure = Not installed
      }
     
      return mapper.map(current.getStateString(), ControllerState.INSTALLED.getStateString());
   }
View Full Code Here

Examples of org.jboss.dependency.spi.ControllerState

            AbstractDemandMetaData demand = (AbstractDemandMetaData) o;
            for (int i = 0; i < attrs.getLength(); ++i)
            {
               String localName = attrs.getLocalName(i);
               if ("state".equals(localName))
                  demand.setWhenRequired(new ControllerState(attrs.getValue(i)));
            }
         }
        
         public Object endElement(Object o, QName qName, ElementBinding element)
         {
            AbstractDemandMetaData x = (AbstractDemandMetaData) o;
            String name = (String) x.getDemand();
            if (name == null || name.trim().length() == 0)
               throw new IllegalArgumentException("Null or empty demand.");
            return o;
         }
      });

      // demand can take a value
      demandType.setSimpleType(new CharactersHandler()
      {
         public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
         {
            return value;
         }

         public void setValue(QName qname, ElementBinding element, Object owner, Object value)
         {
            AbstractDemandMetaData demand = (AbstractDemandMetaData) owner;
            demand.setDemand(value);
         }
      });

      // supply binding
      TypeBinding supplyType = schemaBinding.getType(supplyTypeQName);
      supplyType.setHandler(new DefaultElementHandler()
      {
         public Object startElement(Object parent, QName name, ElementBinding element)
         {
            return new AbstractSupplyMetaData();
         }
        
         public Object endElement(Object o, QName qName, ElementBinding element)
         {
            AbstractSupplyMetaData x = (AbstractSupplyMetaData) o;
            String name = (String) x.getSupply();
            if (name == null || name.trim().length() == 0)
               throw new IllegalArgumentException("Null or empty supply.");
            return o;
         }
      });

      // supply can take a value
      supplyType.setSimpleType(new CharactersHandler()
      {
         public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
         {
            return value;
         }

         public void setValue(QName qName, ElementBinding element, Object owner, Object value)
         {
            AbstractSupplyMetaData supply = (AbstractSupplyMetaData) owner;
            supply.setSupply(value);
         }
      });

      // dependency binding
      TypeBinding dependencyType = schemaBinding.getType(dependencyTypeQName);
      dependencyType.setHandler(new DefaultElementHandler()
      {
         public Object startElement(Object parent, QName name, ElementBinding element)
         {
            return new AbstractDependencyValueMetaData();
         }

         public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
         {
            AbstractDependencyValueMetaData dependency = (AbstractDependencyValueMetaData) o;
            for (int i = 0; i < attrs.getLength(); ++i)
            {
               String localName = attrs.getLocalName(i);
               if ("bean".equals(localName))
                  dependency.setValue(attrs.getValue(i));
               else if ("property".equals(localName))
                  dependency.setProperty(attrs.getValue(i));
               else if ("state".equals(localName))
                  dependency.setDependentState(new ControllerState(attrs.getValue(i)));
            }
         }
        
         public Object endElement(Object o, QName qName, ElementBinding element)
         {
View Full Code Here

Examples of org.jboss.dependency.spi.ControllerState

      return dependentState;
   }
  
   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
   {
      ControllerState state = dependentState;
      if (state == null)
         state = ControllerState.INSTALLED;
      ControllerContext context = controller.getContext(value, dependentState);
      if (context == null)
         throw new Error("Should not be here - dependency failed! " + this);
View Full Code Here

Examples of org.jboss.dependency.spi.ControllerState

   {
      KernelControllerContext controllerContext = visitor.getControllerContext();
      controller = (KernelController) controllerContext.getController();
      Object name = controllerContext.getName();
      Object iDependOn = getUnderlyingValue();
      ControllerState whenRequired = visitor.getContextState();

      DependencyItem item = new AbstractDependencyItem(name, iDependOn, whenRequired, dependentState);
      visitor.addDependency(item);

      super.visit(visitor);
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.