com.sun.corba.se.spi.orbutil.fsm.StateEngine Java Examples

The following examples show how to use com.sun.corba.se.spi.orbutil.fsm.StateEngine. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StateEngineImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ta = new GuardedAction( action, newState ) ;
    oldStateImpl.addGuardedAction( input, ta ) ;

    return this ;
}
 
Example #2
Source File: StateEngineImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #3
Source File: StateEngineImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine setDefault( State oldState, Action action, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    oldStateImpl.setDefaultAction( action ) ;
    oldStateImpl.setDefaultNextState( newState ) ;

    return this ;
}
 
Example #4
Source File: StateEngineImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #5
Source File: StateEngineImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ta = new GuardedAction( action, newState ) ;
    oldStateImpl.addGuardedAction( input, ta ) ;

    return this ;
}
 
Example #6
Source File: StateEngineImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine setDefault( State oldState, Action action, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    oldStateImpl.setDefaultAction( action ) ;
    oldStateImpl.setDefaultNextState( newState ) ;

    return this ;
}
 
Example #7
Source File: StateEngineImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine setDefault( State oldState, Action action, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    oldStateImpl.setDefaultAction( action ) ;
    oldStateImpl.setDefaultNextState( newState ) ;

    return this ;
}
 
Example #8
Source File: StateEngineImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ta = new GuardedAction( action, newState ) ;
    oldStateImpl.addGuardedAction( input, ta ) ;

    return this ;
}
 
Example #9
Source File: StateEngineImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #10
Source File: StateEngineImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #11
Source File: StateEngineImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #12
Source File: StateEngineImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine setDefault( State oldState, Action action, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    oldStateImpl.setDefaultAction( action ) ;
    oldStateImpl.setDefaultNextState( newState ) ;

    return this ;
}
 
Example #13
Source File: StateEngineImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #14
Source File: StateEngineImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #15
Source File: StateEngineImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ta = new GuardedAction( action, newState ) ;
    oldStateImpl.addGuardedAction( input, ta ) ;

    return this ;
}
 
Example #16
Source File: StateEngineImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine setDefault( State oldState, Action action, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    oldStateImpl.setDefaultAction( action ) ;
    oldStateImpl.setDefaultNextState( newState ) ;

    return this ;
}
 
Example #17
Source File: StateEngineImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public StateEngine setDefault( State oldState, Action action, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    oldStateImpl.setDefaultAction( action ) ;
    oldStateImpl.setDefaultNextState( newState ) ;

    return this ;
}
 
Example #18
Source File: StateEngineImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ta = new GuardedAction( action, newState ) ;
    oldStateImpl.addGuardedAction( input, ta ) ;

    return this ;
}
 
Example #19
Source File: StateEngineImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #20
Source File: StateEngineImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Guard guard, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ga = new GuardedAction( guard, action, newState ) ;
    oldStateImpl.addGuardedAction( input, ga ) ;

    return this ;
}
 
Example #21
Source File: StateEngineImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine setDefault( State oldState, Action action, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    oldStateImpl.setDefaultAction( action ) ;
    oldStateImpl.setDefaultNextState( newState ) ;

    return this ;
}
 
Example #22
Source File: StateEngineImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine add( State oldState, Input input, Action action,
    State newState ) throws IllegalArgumentException,
    IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    GuardedAction ta = new GuardedAction( action, newState ) ;
    oldStateImpl.addGuardedAction( input, ta ) ;

    return this ;
}
 
Example #23
Source File: StateEngineImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public StateEngine setDefault( State oldState, Action action, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    mustBeInitializing() ;

    StateImpl oldStateImpl = (StateImpl)oldState ;
    oldStateImpl.setDefaultAction( action ) ;
    oldStateImpl.setDefaultNextState( newState ) ;

    return this ;
}
 
Example #24
Source File: FSMTest.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public MyFSM( StateEngine se )
{
    super( se, FSMTest.STATE1 ) ;
}
 
Example #25
Source File: FSMImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/** Create an instance of an FSM using the StateEngine
* in a particular start state.
*/
public FSMImpl( StateEngine se, State startState )
{
    this( se, startState, false ) ;
}
 
Example #26
Source File: FSMTest.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static void main( String[] args )
{
    TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ;

    StateEngine se = StateEngineFactory.create() ;
    add1( se, STATE1, INPUT1, STATE1 ) ;
    add2( se, STATE1,         STATE2 ) ;

    add1( se, STATE2, INPUT1, STATE2 ) ;
    add1( se, STATE2, INPUT2, STATE2 ) ;
    add1( se, STATE2, INPUT3, STATE1 ) ;
    add1( se, STATE2, INPUT4, STATE3 ) ;

    se.add(   STATE3, INPUT1, ta3,  STATE3 ) ;
    se.add(   STATE3, INPUT1, ta3,  STATE4 ) ;
    add1( se, STATE3, INPUT2, STATE1 ) ;
    add1( se, STATE3, INPUT3, STATE2 ) ;
    add1( se, STATE3, INPUT4, STATE2 ) ;

    MyFSM fsm = new MyFSM( se ) ;
    TestInput in11 = new TestInput( INPUT1, "1.1" ) ;
    TestInput in12 = new TestInput( INPUT1, "1.2" ) ;
    TestInput in21 = new TestInput( INPUT2, "2.1" ) ;
    TestInput in22 = new TestInput( INPUT2, "2.2" ) ;
    TestInput in31 = new TestInput( INPUT3, "3.1" ) ;
    TestInput in32 = new TestInput( INPUT3, "3.2" ) ;
    TestInput in33 = new TestInput( INPUT3, "3.3" ) ;
    TestInput in41 = new TestInput( INPUT4, "4.1" ) ;

    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in12.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in22.getInput() ) ;
    fsm.doIt( in31.getInput() ) ;
    fsm.doIt( in33.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in22.getInput() ) ;
    fsm.doIt( in32.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in12.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
}
 
Example #27
Source File: StateEngineImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public StateEngine setDefault( State oldState, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    return setDefault( oldState, emptyAction, newState ) ;
}
 
Example #28
Source File: FSMImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/** Create an instance of an FSM using the StateEngine
* in a particular start state.
*/
public FSMImpl( StateEngine se, State startState )
{
    this( se, startState, false ) ;
}
 
Example #29
Source File: StateEngineImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public StateEngine setDefault( State oldState, State newState )
    throws IllegalArgumentException, IllegalStateException
{
    return setDefault( oldState, emptyAction, newState ) ;
}
 
Example #30
Source File: FSMTest.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public static void main( String[] args )
{
    TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ;

    StateEngine se = StateEngineFactory.create() ;
    add1( se, STATE1, INPUT1, STATE1 ) ;
    add2( se, STATE1,         STATE2 ) ;

    add1( se, STATE2, INPUT1, STATE2 ) ;
    add1( se, STATE2, INPUT2, STATE2 ) ;
    add1( se, STATE2, INPUT3, STATE1 ) ;
    add1( se, STATE2, INPUT4, STATE3 ) ;

    se.add(   STATE3, INPUT1, ta3,  STATE3 ) ;
    se.add(   STATE3, INPUT1, ta3,  STATE4 ) ;
    add1( se, STATE3, INPUT2, STATE1 ) ;
    add1( se, STATE3, INPUT3, STATE2 ) ;
    add1( se, STATE3, INPUT4, STATE2 ) ;

    MyFSM fsm = new MyFSM( se ) ;
    TestInput in11 = new TestInput( INPUT1, "1.1" ) ;
    TestInput in12 = new TestInput( INPUT1, "1.2" ) ;
    TestInput in21 = new TestInput( INPUT2, "2.1" ) ;
    TestInput in22 = new TestInput( INPUT2, "2.2" ) ;
    TestInput in31 = new TestInput( INPUT3, "3.1" ) ;
    TestInput in32 = new TestInput( INPUT3, "3.2" ) ;
    TestInput in33 = new TestInput( INPUT3, "3.3" ) ;
    TestInput in41 = new TestInput( INPUT4, "4.1" ) ;

    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in12.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in22.getInput() ) ;
    fsm.doIt( in31.getInput() ) ;
    fsm.doIt( in33.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in22.getInput() ) ;
    fsm.doIt( in32.getInput() ) ;
    fsm.doIt( in41.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in12.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
    fsm.doIt( in11.getInput() ) ;
}