1. /*
  2. * Action.java
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.spi.orbutil.fsm;
  8. /**
  9. * Description goes here
  10. *
  11. * @version @(#)Action.java 1.11 03/12/19
  12. * @author Ken Cavanaugh
  13. */
  14. public interface Action
  15. {
  16. /** Called by the state engine to perform an action
  17. * before a state transition takes place. The FSM is
  18. * passed so that the Action may set the next state in
  19. * cases when that is required. FSM and Input together
  20. * allow actions to be written that depend on the state and
  21. * input, but this should generally be avoided, as the
  22. * reason for a state machine in the first place is to cleanly
  23. * separate the actions and control flow. Note that an
  24. * action should complete in a timely manner. If the state machine
  25. * is used for concurrency control with multiple threads, the
  26. * action must not allow multiple threads to run simultaneously
  27. * in the state machine, as the state could be corrupted.
  28. * Any exception thrown by the Action for the transition
  29. * will be propagated to doIt.
  30. * @param FSM fsm is the state machine causing this action.
  31. * @param Input in is the input that caused the transition.
  32. */
  33. public void doIt( FSM fsm, Input in ) ;
  34. }
  35. // end of Action.java