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.

Version:
$Rev: 586695 $, $Date: 2007-10-20 12:01:17 +0200 (sam, 20 oct 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
NoopTransition(Object eventId)
          Creates a new instance which will loopback to the same State for the specified Event id.
NoopTransition(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(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(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-2008 Apache MINA Project. All Rights Reserved.