Polish docs
This commit is contained in:
@@ -1,12 +1,3 @@
|
||||
:hadoop-Configuration: http://hadoop.apache.org/docs/r{hadoop-version}/api/org/apache/hadoop/conf/Configuration.html
|
||||
:hadoop-FileSystem: http://hadoop.apache.org/docs/r{hadoop-version}/api/org/apache/hadoop/fs/FileSystem.html
|
||||
:hadoop-Security: http://hadoop.apache.org/docs/r{hadoop-version}/hadoop-project-dist/hadoop-common/SecureMode.html
|
||||
:hadoop-Streaming: http://hadoop.apache.org/docs/r{hadoop-version}/hadoop-mapreduce-client/hadoop-mapreduce-client-core/HadoopStreaming.html
|
||||
:hadoop-DistributedCache: http://hadoop.apache.org/docs/r{hadoop-version}/hadoop-mapreduce-client/hadoop-mapreduce-client-core/DistributedCacheDeploy.html
|
||||
:hadoop-WordCount: http://hadoop.apache.org/docs/r{hadoop-version}/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html#Example:_WordCount_v1.0
|
||||
:hadoop-FileSystemShell: http://hadoop.apache.org/docs/r{hadoop-version}/hadoop-project-dist/hadoop-common/FileSystemShell.html
|
||||
:hadoop-WebHdfs: http://hadoop.apache.org/docs/r{hadoop-version}/hadoop-project-dist/hadoop-hdfs/WebHDFS.html
|
||||
:hadoop-Hftp: http://hadoop.apache.org/docs/r{hadoop-version}/hadoop-project-dist/hadoop-hdfs/Hftp.html
|
||||
:java-ClassLoader: http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html
|
||||
:core-ApplicationContext: http://docs.spring.io/spring/docs/{spring-version}/javadoc-api/org/springframework/context/ApplicationContext.html
|
||||
:core-beans-factory-placeholderconfigurer: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/beans.html#beans-factory-placeholderconfigurer
|
||||
@@ -18,14 +9,6 @@
|
||||
:core-dao-exceptions: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/dao.html#dao-exceptions
|
||||
:core-jdbc: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/jdbc.html
|
||||
:core-jdbc-JdbcTemplate: http://docs.spring.io/spring/docs/{spring-version}/spring-framework-reference/html/jdbc.html#jdbc-JdbcTemplate
|
||||
:shdp-FsShell: http://docs.spring.io/spring-hadoop/docs/{spring-hadoop-version}/api/org/springframework/data/hadoop/fs/FsShell.html
|
||||
:shdp-DistCp: http://docs.spring.io/spring-hadoop/docs/{spring-hadoop-version}/api/org/springframework/data/hadoop/fs/DistCp.html
|
||||
:shdp-HdfsResourceLoader: http://docs.spring.io/spring-hadoop/docs/{spring-hadoop-version}/api/org/springframework/data/hadoop/fs/HdfsResourceLoader.html
|
||||
:shdp-SpringDataStoreTextWriterConfigurerAdapter: http://docs.spring.io/spring-hadoop/docs/{spring-hadoop-version}/api/org/springframework/data/hadoop/store/config/annotation/SpringDataStoreTextWriterConfigurerAdapter.html
|
||||
:shdp-EnableDataStoreTextWriter: http://docs.spring.io/spring-hadoop/docs/{spring-hadoop-version}/api/org/springframework/data/hadoop/store/config/annotation/EnableDataStoreTextWriter.html
|
||||
:shdp-DataStoreTextWriterConfigurer: http://docs.spring.io/spring-hadoop/docs/{spring-hadoop-version}/api/org/springframework/data/hadoop/store/config/annotation/builders/DataStoreTextWriterConfigurer.html
|
||||
:shdp-DataStoreWriter: http://docs.spring.io/spring-hadoop/docs/{spring-hadoop-version}/api/org/springframework/data/hadoop/store/DataStoreWriter.html
|
||||
:spring-data-hadoop-boot-jar: spring-data-hadoop-boot-{spring-hadoop-version}.jar
|
||||
|
||||
= Spring Statemachine - Reference Documentation
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[[introduction]]
|
||||
= Introduction
|
||||
Spring State Machine(SSM) is a framework for application developers to
|
||||
Spring Statemachine(SSM) is a framework for application developers to
|
||||
use traditional state machine concepts with Spring applications. SSM
|
||||
aims to provide following features:
|
||||
|
||||
@@ -22,8 +22,8 @@ familiar with state machine concepts.
|
||||
== Requirements
|
||||
Spring Statemachine {revnumber} is built and tested with JDK 7 and Spring
|
||||
Framework {spring-version} and doesn't require any other dependencies
|
||||
outside of Spring Framework. Samples will require spring-shell and
|
||||
spring-boot which will pull other dependencies beyond Framework
|
||||
outside of Spring Framework. Samples require spring-shell and
|
||||
spring-boot which pulls other dependencies beyond framework
|
||||
itself.
|
||||
|
||||
== Background
|
||||
@@ -32,12 +32,12 @@ consistent and relatively easily debugged due to ways how operational
|
||||
rules are written in stone when machine is started. Idea is that your
|
||||
application is and may exist in a finite number of states and then something
|
||||
happens which takes your application from one state to the next. What
|
||||
will drive a state machine are triggers which are either based on an
|
||||
will drive a state machine are triggers which are either based on
|
||||
events or timers.
|
||||
|
||||
It is much easier to design high level logic outside of your
|
||||
application and then interact with a state machine with a various
|
||||
different ways. You will simple send interact with a state machine by
|
||||
different ways. You can simply interact with a state machine by
|
||||
sending event, listening what a state machine does or simply request a
|
||||
current state.
|
||||
|
||||
@@ -67,7 +67,7 @@ You are already trying to implement a state machine if:
|
||||
|
||||
== Feature Limitations
|
||||
|
||||
A lot of features are planned thus not all expected feature are ntot
|
||||
A lot of features are planned for future releases thus some are not
|
||||
yet implemented:
|
||||
|
||||
* Regions are not fully supported and currently contains many bugs.
|
||||
|
||||
@@ -2,11 +2,24 @@
|
||||
= State Machine Examples
|
||||
|
||||
This part of the reference documentation explains the use of state
|
||||
machines as sample code together with a uml state charts. We do few
|
||||
machines together with a sample code and a uml state charts. We do few
|
||||
shortcuts when representing relationship between a state chart, SSM
|
||||
configuration and what an application does with a state machine. For
|
||||
complete examples go and study the samples repository.
|
||||
|
||||
Samples are build directly from a main source distribution during a
|
||||
normal build cycle.
|
||||
|
||||
[source,text]
|
||||
----
|
||||
./gradlew clean build -x test
|
||||
----
|
||||
|
||||
Every sample is located in its own directory under
|
||||
`spring-statemachine-samples`. Samples are based on spring-boot and
|
||||
spring-shell and you will find usual boot fat jars under every sample
|
||||
projects `build/libs` directory.
|
||||
|
||||
== Turnstile
|
||||
|
||||
Turnstile is a simple device which gives you an access if payment is
|
||||
|
||||
@@ -8,7 +8,9 @@ that Spring Statemachine provides to any Spring based application.
|
||||
|
||||
<<sm-factories>> describes the generic state machine factory support.
|
||||
|
||||
<<sm-listeners>> describes the generic state machine listener support.
|
||||
<<sm-triggers>> describes the use of triggers.
|
||||
|
||||
<<sm-listeners>> describes the use of state machine listeners.
|
||||
|
||||
<<sm-context>> describes the generic Spring application context support.
|
||||
|
||||
@@ -53,15 +55,15 @@ include::samples/DocsConfigurationSampleTests.java[tags=snippetC]
|
||||
|
||||
=== Configuring Guards
|
||||
Guards are used to protect state transitions. Interface _Guard_ is
|
||||
used to do an evaluation where method has access to _StateContext_.
|
||||
used to do an evaluation where method has access to a _StateContext_.
|
||||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
include::samples/DocsConfigurationSampleTests.java[tags=snippetD]
|
||||
----
|
||||
|
||||
In above two different types of guard configuration is used. Firstly a
|
||||
simply _Guard_ is created as a bean and attached to transition between
|
||||
In above two different types of guard configurations are used. Firstly a
|
||||
simple _Guard_ is created as a bean and attached to transition between
|
||||
states `S1` and `S2`.
|
||||
|
||||
Secondly a simple spel expression can be used as a guard where
|
||||
@@ -238,7 +240,7 @@ event enums user have created due to java language limitations, thus
|
||||
string representation have to be used.
|
||||
|
||||
However if you want to have a type safe annotation it is possible to
|
||||
create a new annotation and use _@OnTransition_ as meta annotations.
|
||||
create a new annotation and use _@OnTransition_ as meta annotation.
|
||||
This user level annotation can make a reference to actual states and
|
||||
events enums and framework will try to match these in a same way.
|
||||
|
||||
|
||||
@@ -59,7 +59,8 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
public static class Config1 extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
|
||||
@Override
|
||||
public void configure(StateMachineStateConfigurer<States, Events> states) throws Exception {
|
||||
public void configure(StateMachineStateConfigurer<States, Events> states)
|
||||
throws Exception {
|
||||
states
|
||||
.withStates()
|
||||
.initial(States.S1)
|
||||
@@ -76,7 +77,8 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
public static class Config2 extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
|
||||
@Override
|
||||
public void configure(StateMachineStateConfigurer<States, Events> states) throws Exception {
|
||||
public void configure(StateMachineStateConfigurer<States, Events> states)
|
||||
throws Exception {
|
||||
states
|
||||
.withStates()
|
||||
.initial(States.S1)
|
||||
@@ -97,7 +99,8 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
public static class Config3 extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
|
||||
@Override
|
||||
public void configure(StateMachineStateConfigurer<States, Events> states) throws Exception {
|
||||
public void configure(StateMachineStateConfigurer<States, Events> states)
|
||||
throws Exception {
|
||||
states
|
||||
.withStates()
|
||||
.initial(States.S1)
|
||||
@@ -105,7 +108,8 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(StateMachineTransitionConfigurer<States, Events> transitions) throws Exception {
|
||||
public void configure(StateMachineTransitionConfigurer<States, Events> transitions)
|
||||
throws Exception {
|
||||
transitions
|
||||
.withExternal()
|
||||
.source(States.S1).target(States.S2)
|
||||
@@ -129,7 +133,8 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
public static class Config4 extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
|
||||
@Override
|
||||
public void configure(StateMachineTransitionConfigurer<States, Events> transitions) throws Exception {
|
||||
public void configure(StateMachineTransitionConfigurer<States, Events> transitions)
|
||||
throws Exception {
|
||||
transitions
|
||||
.withExternal()
|
||||
.source(States.S1).target(States.S2)
|
||||
@@ -163,7 +168,8 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
public static class Config5 extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
|
||||
@Override
|
||||
public void configure(StateMachineTransitionConfigurer<States, Events> transitions) throws Exception {
|
||||
public void configure(StateMachineTransitionConfigurer<States, Events> transitions)
|
||||
throws Exception {
|
||||
transitions
|
||||
.withExternal()
|
||||
.source(States.S1)
|
||||
@@ -189,10 +195,12 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
// tag::snippetF[]
|
||||
@Configuration
|
||||
@EnableStateMachineFactory
|
||||
public static class Config6 extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
public static class Config6
|
||||
extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
|
||||
@Override
|
||||
public void configure(StateMachineStateConfigurer<States, Events> states) throws Exception {
|
||||
public void configure(StateMachineStateConfigurer<States, Events> states)
|
||||
throws Exception {
|
||||
states
|
||||
.withStates()
|
||||
.initial(States.S1)
|
||||
@@ -205,7 +213,8 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
|
||||
|
||||
// tag::snippetG[]
|
||||
static class StateMachineApplicationEventListener implements ApplicationListener<StateMachineEvent> {
|
||||
static class StateMachineApplicationEventListener
|
||||
implements ApplicationListener<StateMachineEvent> {
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(StateMachineEvent event) {
|
||||
@@ -214,7 +223,8 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
// end::snippetG[]
|
||||
|
||||
// tag::snippetH[]
|
||||
static class StateMachineEventListener extends StateMachineListenerAdapter<States, Events> {
|
||||
static class StateMachineEventListener
|
||||
extends StateMachineListenerAdapter<States, Events> {
|
||||
|
||||
@Override
|
||||
public void stateChanged(State<States, Events> from, State<States, Events> to) {
|
||||
@@ -314,12 +324,14 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
|
||||
// tag::snippetN[]
|
||||
@Configuration
|
||||
@EnableStateMachine(contextEvents = false)
|
||||
public static class Config8 extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
public static class Config8
|
||||
extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableStateMachineFactory(contextEvents = false)
|
||||
public static class Config9 extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
public static class Config9
|
||||
extends EnumStateMachineConfigurerAdapter<States, Events> {
|
||||
}
|
||||
// end::snippetN[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user