Spring Statemachine 2.2.0

Spring Statemachine is a framework for application developers to use state machine concepts with Spring applications.

Spring Statemachine aims to provide following features:

Easy to use flat one level state machine for simple use cases.

Hierarchical state machine structure to ease complex state configuration.

State machine regions to provide even more complex state configurations.

Usage of triggers, transitions, guards and actions.

Type safe configuration adapter.

Builder pattern for easy instantiation for use outside of Spring Application context

Recipes for usual use cases

Distributed state machine based on a Zookeeper

State machine event listeners.

UML Eclipse Papyrus modeling.

Store machine config in a persistent storage.

Spring IOC integration to associate beans with a state machine.

State machines are powerful because behaviour is always guaranteed to be consistent, making it relatively easy to debug. This is because operational rules are written in stone when the machine is started. The idea is that your application may exist in a finite number of states and certain predefined triggers can take your application from one state to the next. Such triggers can be based on either events or timers.

It is much easier to define high level logic outside of your application and then rely on the state machine to manage state. You can interact with the state machine by sending an event, listening for changes or simply request a current state.
Spring Initializr
Quickstart Your Project
Bootstrap your application with Spring Initializr.

translate:
翻译:

Spring state machine是一个应用程序开发人员将状态机概念用于Spring应用程序的框架。

Spring Statemachine旨在提供以下功能:

易于使用的平面一级状态机,用于简单的用例。

分层状态机结构,以简化复杂的状态配置。

状态机区域提供更复杂的状态配置。

触发器、转换、保护和操作的使用。

类型安全配置适配器。

在Spring应用程序上下文之外使用的易于实例化的构建器模式

常用用例的配方

基于Zookeeper的分布式状态机

状态机事件侦听器。

UML Eclipse纸草建模。

将机器配置存储在永久性存储器中。

Spring IOC集成,将bean与状态机相关联。

状态机是强大的,因为行为总是保证一致的,使得调试相对容易。这是因为机器启动时操作规则是用石头写的。其思想是,您的应用程序可能存在于有限数量的状态中,并且某些预定义的触发器可以将您的应用程序从一种状态带到另一种状态。此类触发器可以基于事件或计时器。

在应用程序外部定义高级逻辑,然后依赖状态机来管理状态要容易得多。您可以通过发送事件、侦听更改或简单地请求当前状态来与状态机交互。

弹簧初始化器

快速启动项目

使用Spring初始化器引导应用程序。

发布了0 篇原创文章 · 获赞 152 · 访问量 7036

猜你喜欢

转载自blog.csdn.net/blog_programb/article/details/105293004