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

The following examples show how to use com.sun.corba.se.spi.orbutil.fsm.Input. 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 openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void doIt( FSM fsm, Input in, boolean debug )
{
    // This method is present only for debugging.
    // innerDoIt does the actual transition.

    if (debug)
        ORBUtility.dprint( this, "doIt enter: currentState = " +
            fsm.getState() + " in = " + in ) ;

    try {
        innerDoIt( fsm, in, debug ) ;
    } finally {
        if (debug)
            ORBUtility.dprint( this, "doIt exit" ) ;
    }
}
 
Example #2
Source File: FSMTest.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction2:" ) ;
    System.out.println( "\toldState = " + oldState ) ;
    System.out.println( "\tnewState = " + newState ) ;
    System.out.println( "\tinput    = " + in ) ;
    if (oldState != fsm.getState())
        throw new Error( "Unexpected old State " + fsm.getState() ) ;
}
 
Example #3
Source File: StateEngineImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public void doIt( FSM fsm, Input in, boolean debug )
{
    // This method is present only for debugging.
    // innerDoIt does the actual transition.

    if (debug)
        ORBUtility.dprint( this, "doIt enter: currentState = " +
            fsm.getState() + " in = " + in ) ;

    try {
        innerDoIt( fsm, in, debug ) ;
    } finally {
        if (debug)
            ORBUtility.dprint( this, "doIt exit" ) ;
    }
}
 
Example #4
Source File: StateEngineImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void doIt( FSM fsm, Input in, boolean debug )
{
    // This method is present only for debugging.
    // innerDoIt does the actual transition.

    if (debug)
        ORBUtility.dprint( this, "doIt enter: currentState = " +
            fsm.getState() + " in = " + in ) ;

    try {
        innerDoIt( fsm, in, debug ) ;
    } finally {
        if (debug)
            ORBUtility.dprint( this, "doIt exit" ) ;
    }
}
 
Example #5
Source File: FSMTest.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction1:" ) ;
    System.out.println( "\tlabel    = " + label ) ;
    System.out.println( "\toldState = " + oldState ) ;
    if (label != in)
        throw new Error( "Unexcepted Input " + in ) ;
}
 
Example #6
Source File: FSMTest.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction1:" ) ;
    System.out.println( "\tlabel    = " + label ) ;
    System.out.println( "\toldState = " + oldState ) ;
    System.out.println( "\tnewState = " + newState ) ;
    if (label != in)
        throw new Error( "Unexcepted Input " + in ) ;
    if (oldState != fsm.getState())
        throw new Error( "Unexpected old State " + fsm.getState() ) ;
}
 
Example #7
Source File: FSMTest.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction1:" ) ;
    System.out.println( "\tlabel    = " + label ) ;
    System.out.println( "\toldState = " + oldState ) ;
    if (label != in)
        throw new Error( "Unexcepted Input " + in ) ;
}
 
Example #8
Source File: AOMEntry.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in ) {
    AOMEntry entry = (AOMEntry)fsm ;
    if (entry.counter[0] > 0)
        entry.counter[0]-- ;
    else
        throw entry.poa.lifecycleWrapper().aomEntryDecZero() ;
}
 
Example #9
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 #10
Source File: FSMTest.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction2:" ) ;
    System.out.println( "\toldState = " + oldState ) ;
    System.out.println( "\tnewState = " + newState ) ;
    System.out.println( "\tinput    = " + in ) ;
    if (oldState != fsm.getState())
        throw new Error( "Unexpected old State " + fsm.getState() ) ;
}
 
Example #11
Source File: FSMTest.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction2:" ) ;
    System.out.println( "\toldState = " + oldState ) ;
    System.out.println( "\tnewState = " + newState ) ;
    System.out.println( "\tinput    = " + in ) ;
    if (oldState != fsm.getState())
        throw new Error( "Unexpected old State " + fsm.getState() ) ;
}
 
Example #12
Source File: AOMEntry.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void doIt( FSM fsm, Input in ) {
    AOMEntry entry = (AOMEntry)fsm ;
    if (entry.counter[0] > 0)
        entry.counter[0]-- ;
    else
        throw entry.poa.lifecycleWrapper().aomEntryDecZero() ;
}
 
Example #13
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 #14
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 #15
Source File: StateEngineImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngineImpl()
{
    initializing = true ;
    defaultAction = new ActionBase("Invalid Transition")
        {
            public void doIt( FSM fsm, Input in )
            {
                throw new INTERNAL(
                    "Invalid transition attempted from " +
                        fsm.getState() + " under " + in ) ;
            }
        } ;
}
 
Example #16
Source File: FSMTest.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction1:" ) ;
    System.out.println( "\tlabel    = " + label ) ;
    System.out.println( "\toldState = " + oldState ) ;
    System.out.println( "\tnewState = " + newState ) ;
    if (label != in)
        throw new Error( "Unexcepted Input " + in ) ;
    if (oldState != fsm.getState())
        throw new Error( "Unexpected old State " + fsm.getState() ) ;
}
 
Example #17
Source File: StateEngineImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public StateEngineImpl()
{
    initializing = true ;
    defaultAction = new ActionBase("Invalid Transition")
        {
            public void doIt( FSM fsm, Input in )
            {
                throw new INTERNAL(
                    "Invalid transition attempted from " +
                        fsm.getState() + " under " + in ) ;
            }
        } ;
}
 
Example #18
Source File: FSMTest.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction1:" ) ;
    System.out.println( "\tlabel    = " + label ) ;
    System.out.println( "\toldState = " + oldState ) ;
    if (label != in)
        throw new Error( "Unexcepted Input " + in ) ;
}
 
Example #19
Source File: NameBase.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private String getPreferredClassName()
{
    if (this instanceof Action)
        return "Action" ;
    if (this instanceof State)
        return "State" ;
    if (this instanceof Guard)
        return "Guard" ;
    if (this instanceof Input)
        return "Input" ;
    return getClassName() ;
}
 
Example #20
Source File: AOMEntry.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Guard.Result evaluate( FSM fsm, Input in ) {
    AOMEntry entry = (AOMEntry)fsm ;
    try {
        entry.wait.await() ;
    } catch (InterruptedException exc) {
        // XXX Log this
        // NO-OP
    }

    return Guard.Result.DEFERED ;
}
 
Example #21
Source File: StateEngineImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public StateEngineImpl()
{
    initializing = true ;
    defaultAction = new ActionBase("Invalid Transition")
        {
            public void doIt( FSM fsm, Input in )
            {
                throw new INTERNAL(
                    "Invalid transition attempted from " +
                        fsm.getState() + " under " + in ) ;
            }
        } ;
}
 
Example #22
Source File: AOMEntry.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in ) {
    AOMEntry entry = (AOMEntry)fsm ;
    if (entry.counter[0] > 0)
        entry.counter[0]-- ;
    else
        throw entry.poa.lifecycleWrapper().aomEntryDecZero() ;
}
 
Example #23
Source File: NameBase.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private String getPreferredClassName()
{
    if (this instanceof Action)
        return "Action" ;
    if (this instanceof State)
        return "State" ;
    if (this instanceof Guard)
        return "Guard" ;
    if (this instanceof Input)
        return "Input" ;
    return getClassName() ;
}
 
Example #24
Source File: AOMEntry.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Guard.Result evaluate( FSM fsm, Input in ) {
    AOMEntry entry = (AOMEntry)fsm ;
    try {
        entry.wait.await() ;
    } catch (InterruptedException exc) {
        // XXX Log this
        // NO-OP
    }

    return Guard.Result.DEFERED ;
}
 
Example #25
Source File: StateEngineImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public StateEngineImpl()
{
    initializing = true ;
    defaultAction = new ActionBase("Invalid Transition")
        {
            public void doIt( FSM fsm, Input in )
            {
                throw new INTERNAL(
                    "Invalid transition attempted from " +
                        fsm.getState() + " under " + in ) ;
            }
        } ;
}
 
Example #26
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 #27
Source File: NameBase.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private String getPreferredClassName()
{
    if (this instanceof Action)
        return "Action" ;
    if (this instanceof State)
        return "State" ;
    if (this instanceof Guard)
        return "Guard" ;
    if (this instanceof Input)
        return "Input" ;
    return getClassName() ;
}
 
Example #28
Source File: StateEngineImpl.java    From JDKSourceCode1.8 with MIT License 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 #29
Source File: FSMTest.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction1:" ) ;
    System.out.println( "\tlabel    = " + label ) ;
    System.out.println( "\toldState = " + oldState ) ;
    System.out.println( "\tnewState = " + newState ) ;
    if (label != in)
        throw new Error( "Unexcepted Input " + in ) ;
    if (oldState != fsm.getState())
        throw new Error( "Unexpected old State " + fsm.getState() ) ;
}
 
Example #30
Source File: FSMTest.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void doIt( FSM fsm, Input in )
{
    System.out.println( "TestAction2:" ) ;
    System.out.println( "\toldState = " + oldState ) ;
    System.out.println( "\tnewState = " + newState ) ;
    System.out.println( "\tinput    = " + in ) ;
    if (oldState != fsm.getState())
        throw new Error( "Unexpected old State " + fsm.getState() ) ;
}