org.squirrelframework.foundation.fsm.Action Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of squirrel-foundation Show documentation
Show all versions of squirrel-foundation Show documentation
foundation module of squirrel framework which provided event driven infrastructure and a finite state machine implementation.
package org.squirrelframework.foundation.fsm;
import org.squirrelframework.foundation.component.SquirrelComponent;
/**
* An activity that is executed during transition happening.
*
* @author Henry.He
*
* @param type of State Machine
* @param type of State
* @param type of Event
* @param type of Context
*/
public interface Action, S, E, C> extends SquirrelComponent {
/**
* Execute the activity.
*
* @param from transition source state
* @param to transition target state
* @param event event that trigger the transition
* @param context context object
* @param stateMachine the state machine
*/
void execute(S from, S to, E event, C context, T stateMachine);
}