org.progeeks.fsm
Class TransitionHandler

java.lang.Object
  extended by org.progeeks.fsm.TransitionHandler
All Implemented Interfaces:
StateHandler
Direct Known Subclasses:
ForwardingTransitionHandler

public class TransitionHandler
extends java.lang.Object
implements StateHandler

A handler that simply returns an arbitrary state transition.

Version:
$Revision: 1.1 $
Author:
Paul Speed

Constructor Summary
TransitionHandler(int state)
          Creates a transition handler that will return the specified state when processed.
 
Method Summary
 int getTransitionState()
          Returns the transition state value.
 int handleMessage(int state, int message, java.lang.Object stateInfo)
          Returns the TransitionHandler's state value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransitionHandler

public TransitionHandler(int state)
Creates a transition handler that will return the specified state when processed.

Method Detail

getTransitionState

public int getTransitionState()
Returns the transition state value.


handleMessage

public int handleMessage(int state,
                         int message,
                         java.lang.Object stateInfo)
Returns the TransitionHandler's state value.

Specified by:
handleMessage in interface StateHandler
Parameters:
state - The current state the called this handler.
message - The numeric message to be handled.
stateInfo - The application specific data on which the handler can operate if necessary.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2002-2003 Paul Speed. All Rights Reserved.