org.apache.mina.statemachine.transition
Interface Transition

All Known Implementing Classes:
AbstractTransition, MethodTransition, NoopTransition

public interface Transition

The interface implemented by classes which need to react on transitions between states.

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

Method Summary
 boolean execute(Event event)
          Executes this Transition.
 State getNextState()
          Returns the State which the StateMachine should move to if this Transition is taken and execute(Event) returns true.
 

Method Detail

execute

boolean execute(Event event)
Executes this Transition. It is the responsibility of this Transition to determine whether it actually applies for the specified Event. If this Transition doesn't apply nothing should be executed and false must be returned.

Parameters:
event - the current Event.
Returns:
true if the Transition was executed, false otherwise.

getNextState

State getNextState()
Returns the State which the StateMachine should move to if this Transition is taken and execute(Event) returns true.

Returns:
the next State or null if this Transition is a loopback Transition.


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