Examples of State


Examples of org.jboss.bpm.monitor.model.bpaf.State

*/
public final class InstanceEndAdapter implements EventAdapter.EventDetailMapping<ProcessCompletionEvent> {
    public Event adoptDetails(Event target, ProcessCompletionEvent source) {

        Event.EventDetails details = target.getEventDetails();
        State state = source.getFault()!=null ?
                State.Closed_Completed_Failed : State.Closed_Completed;

        details.setCurrentState(state);

        if(State.Closed_Completed_Failed == details.getCurrentState())
View Full Code Here

Examples of org.jboss.cache.factories.ComponentRegistry.State

      }
      componentLookup.put(name, c);

      addComponentDependencies(c, old == null);

      State stateToMoveTo = overallState == null ? CONSTRUCTED : overallState;
      c.changeState(stateToMoveTo);

      // make sure any other omponents that have inadvertently been stopped are now restarted.
      if (old != null)
      {
View Full Code Here

Examples of org.jboss.errai.otec.client.State

      }

      if (nonCanon)
        return shouldPropagate();

      final State state = entity.getState();

      for (final Mutation mutation : mutations) {
        mutation.apply(state);
      }
View Full Code Here

Examples of org.jboss.gravia.runtime.Module.State

                Runtime runtime = RuntimeLocator.getRequiredRuntime();
                Set<Module> modules = runtime.getModules();
                Iterator<Module> itmods = modules.iterator();
                while (itmods.hasNext()) {
                    Module module = itmods.next();
                    State state = module.getState();
                    if (!states.contains(state)) {
                        itmods.remove();
                    }
                }
                /* set tracked with the initial modules */
 
View Full Code Here

Examples of org.jboss.msc.service.ServiceController.State

        return future.get(5, TimeUnit.SECONDS);
    }

    void assertServiceState(ServiceName serviceName, State expState, long timeout) throws Exception {
        ServiceController<?> controller = getServiceContainer().getService(serviceName);
        State state = controller != null ? controller.getState() : null;
        while ((state == null || state != expState) && timeout > 0) {
            try {
                Thread.sleep(100);
            } catch (InterruptedException ex) {
                // ignore
View Full Code Here

Examples of org.jboss.test.cluster.ejb3.stateful.State

      StatefulTx stateful = (StatefulTx)getInitialContext().lookup("StatefulTxBean/remote");
      assertNotNull(stateful);
     
      try
      {
         stateful.testMandatoryTx(new State("test"));
         fail("should have caught exception");
      }
      catch (javax.ejb.EJBTransactionRequiredException e)
      {
      }
View Full Code Here

Examples of org.jboss.util.state.State

      String description = root.getAttribute("description");
      HashMap nameToStateMap = new HashMap();
      HashMap nameToTransitionsMap = new HashMap();
      HashSet states = new HashSet();
      State startState = null;

      // parse states
      NodeList stateList = root.getChildNodes();
      for (int i = 0; i < stateList.getLength(); i++)
      {
         Node stateNode = stateList.item(i);
         if (stateNode.getNodeName().equals("state"))
         {
            Element stateElement = (Element)stateNode;
            String stateName = stateElement.getAttribute("name");
            State s = new State(stateName);
            states.add(s);
            nameToStateMap.put(stateName, s);
            HashMap transitions = new HashMap();
           
            // parse transitions
            NodeList transitionList = stateElement.getChildNodes();
            for (int j = 0; j < transitionList.getLength(); j++)
            {
               Node transitionNode = transitionList.item(j);
               if (transitionNode.getNodeName().equals("transition"))
               {
                  Element transitionElement = (Element)transitionNode;
                  String name = transitionElement.getAttribute("name");
                  String targetName = transitionElement.getAttribute("target");
                  transitions.put(name, targetName);
               }
            }
            nameToTransitionsMap.put(stateName, transitions);
            if (Boolean.valueOf(stateElement.getAttribute("isStartState")) == Boolean.TRUE)
               startState = s;
         }
      }
     
      // Resolve all transition targets
      Iterator transitions = nameToTransitionsMap.keySet().iterator();
      StringBuffer resolveFailed = new StringBuffer();
      while (transitions.hasNext())
      {
         String stateName = (String)transitions.next();
         State s = (State)nameToStateMap.get(stateName);
         HashMap stateTransitions = (HashMap)nameToTransitionsMap.get(stateName);
         Iterator it = stateTransitions.keySet().iterator();
         while (it.hasNext())
         {
            String name = (String)it.next();
            String targetName = (String)stateTransitions.get(name);
            State target = (State)nameToStateMap.get(targetName);
            if (target == null)
            {
               String msg = "Failed to resolve target state: " + targetName + " for transition: " + name;
               resolveFailed.append(msg);
               log.debug(msg);
View Full Code Here

Examples of org.jboss.ws.core.soap.SOAPContent.State

      return getParamMetaData().getJavaType();
   }

   protected State transitionTo(State nextState)
   {
      State prevState = soapContent.getState();
      if (nextState != prevState)
      {
         log.debug("-----------------------------------");
         log.debug("Transitioning from " + prevState + " to " + nextState);
         lockDOMExpansion = true;
View Full Code Here

Examples of org.jbpm.graph.node.State

    assertEquals("com.foo.Fighting", element.attributeValue("class"));
  }

  public void testWriteConfigurableAction() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    State state = (State) processDefinition.addNode( new State("a") );
    Delegation instantiatableDelegate = new Delegation();
    instantiatableDelegate.setClassName("com.foo.Fighting");
    instantiatableDelegate.setConfigType("bean");
    instantiatableDelegate.setConfiguration("<id>4</id><greeting>aloha</greeting>");
    state.addEvent(new Event("node-enter")).addAction(new Action(instantiatableDelegate));
    Element element = AbstractXmlTestCase.toXmlAndParse( processDefinition, "/process-definition/state[1]/event[1]/action[1]" );

    assertNotNull(element);
    assertEquals("action", element.getName());
    assertEquals("bean", element.attributeValue("config-type"));
View Full Code Here

Examples of org.jclouds.docker.domain.State

   public void setup() {
      function = new StateToStatus();
   }

   public void testStateRunningToStatusRunning() {
      State mockState = mockStateRunning();

      NodeMetadata.Status status = function.apply(mockState);

      verify(mockState);

      assertEquals(mockState.isRunning(), true);
      assertEquals(status, NodeMetadata.Status.RUNNING);
   }
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.