org.apache.mina.statemachine.transition
Class NoopTransition

java.lang.Object
  extended by org.apache.mina.statemachine.transition.AbstractTransition
      extended by org.apache.mina.statemachine.transition.NoopTransition
All Implemented Interfaces:
Transition

public class NoopTransition
extends AbstractTransition

Transition implementation which does nothing but change the state.

Author:
Apache MINA Project

Constructor Summary
NoopTransition(java.lang.Object eventId)
          Creates a new instance which will loopback to the same State for the specified Event id.
NoopTransition(java.lang.Object eventId, State nextState)
          Creates a new instance with the specified State as next state and for the specified Event id.
 
Method Summary
protected  boolean doExecute(Event event)
          Executes this Transition.
 
Methods inherited from class org.apache.mina.statemachine.transition.AbstractTransition
equals, execute, getNextState, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NoopTransition

public NoopTransition(java.lang.Object eventId)
Creates a new instance which will loopback to the same State for the specified Event id.

Parameters:
eventId - the Event id.

NoopTransition

public NoopTransition(java.lang.Object eventId,
                      State nextState)
Creates a new instance with the specified State as next state and for the specified Event id.

Parameters:
eventId - the Event id.
nextState - the next State.
Method Detail

doExecute

protected boolean doExecute(Event event)
Description copied from class: AbstractTransition
Executes this Transition. This method doesn't have to check if the Event's id matches because AbstractTransition.execute(Event) has already made sure that that is the case.

Specified by:
doExecute in class AbstractTransition
Parameters:
event - the current Event.
Returns:
true if the Transition has been executed successfully and the StateMachine should move to the next State. false otherwise.


Copyright © 2004-2011 Apache MINA Project. All Rights Reserved.