Examples of StateMachine


Examples of org.ggp.base.util.statemachine.StateMachine

        frame.setPreferredSize(new Dimension(1200, 900));
        frame.getContentPane().add(theVisual);
        frame.pack();
        frame.setVisible(true);

        StateMachine theMachine = new CachedStateMachine(new ProverStateMachine());
        theMachine.initialize(theGame.getRules());
        try {
            MachineState theCurrentState = theMachine.getInitialState();
            do {
                theVisual.observe(new ServerNewGameStateEvent(theCurrentState));
                theCurrentState = theMachine.getRandomNextState(theCurrentState);
                Thread.sleep(250);
                System.out.println("State: " + theCurrentState);
            } while(!theMachine.isTerminal(theCurrentState));
            theVisual.observe(new ServerNewGameStateEvent(theCurrentState));
        } catch (Exception e) {
            e.printStackTrace();
        }
  }
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      }

      if (resolveFailed.length() > 0)
         throw new Exception("Failed to resolve transition targets: " + resolveFailed);

      StateMachine sm = new StateMachine(states, startState, description);
      return sm;
   }
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      }

      if (resolveFailed.length() > 0)
         throw new Exception("Failed to resolve transition targets: " + resolveFailed);

      StateMachine sm = new StateMachine(states, startState, description);
      return sm;
   }
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      throws PolicyContextException
   {
      JBossPolicyConfiguration pc = (JBossPolicyConfiguration) policyConfigMap.get(contextID);
      if( pc == null )
      {
         StateMachine sm = (StateMachine) configStateMachine.clone();
         pc = new JBossPolicyConfiguration(contextID, policy, sm);
         policyConfigMap.put(contextID, pc);
      }
      pc.initPolicyConfiguration(remove);
      return pc;
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      throws PolicyContextException
   {
      JBossPolicyConfiguration pc = (JBossPolicyConfiguration) policyConfigMap.get(contextID);
      if( pc == null )
      {
         StateMachine sm = (StateMachine) configStateMachine.clone();
         pc = new JBossPolicyConfiguration(contextID, policy, sm);
         policyConfigMap.put(contextID, pc);
      }
      pc.initPolicyConfiguration(remove);
      return pc;
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      throws PolicyContextException
   {
      JBossPolicyConfiguration pc = (JBossPolicyConfiguration) policyConfigMap.get(contextID);
      if( pc == null )
      {
         StateMachine sm = (StateMachine) configStateMachine.clone();
         pc = new JBossPolicyConfiguration(contextID, policy, sm);
         policyConfigMap.put(contextID, pc);
      }
      pc.initPolicyConfiguration(remove);
      return pc;
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      }

      if (resolveFailed.length() > 0)
         throw new Exception("Failed to resolve transition targets: " + resolveFailed);

      StateMachine sm = new StateMachine(states, startState, description);
      return sm;
   }
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      }

      if( resolveFailed.length() > 0 )
         throw new DocumentException("Failed to resolve transition targets: "+resolveFailed);

      StateMachine sm = new StateMachine(states, startState, description);
      return sm;
   }
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      throws PolicyContextException
   {
      JBossPolicyConfiguration pc = (JBossPolicyConfiguration) policyConfigMap.get(contextID);
      if( pc == null )
      {
         StateMachine sm = (StateMachine) configStateMachine.clone();
         pc = new JBossPolicyConfiguration(contextID, policy, sm);
         policyConfigMap.put(contextID, pc);
      }
      pc.initPolicyConfiguration(remove);
      return pc;
View Full Code Here

Examples of org.jboss.util.state.StateMachine

      throws PolicyContextException
   {
      JBossPolicyConfiguration pc = (JBossPolicyConfiguration) policyConfigMap.get(contextID);
      if( pc == null )
      {
         StateMachine sm = (StateMachine) configStateMachine.clone();
         pc = new JBossPolicyConfiguration(contextID, policy, sm);
         policyConfigMap.put(contextID, pc);
      }
      pc.initPolicyConfiguration(remove);
      return pc;
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.