|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.webflow.executor.FlowExecutorImpl
public class FlowExecutorImpl
The default implementation of the central facade for driving the execution of flows within an application.
This object is responsible for creating and starting new flow executions as requested by clients, as well as signaling events for processing by existing, paused executions (that are waiting to be resumed in response to a user event).
This object is a facade or entry point into the Spring Web Flow execution system and makes the overall system easier to use. The name executor was chosen as executors drive executions.
Commonly used configurable properties
name | description | default |
definitionLocator | The service locator responsible for loading flow definitions to execute. | None |
executionFactory | The factory responsible for creating new flow executions. | None |
executionRepository | The repository responsible for managing flow execution persistence. | None |
inputMapper | The service responsible for mapping attributes of external contexts that request to
launch new flow executions . After mapping, the target map is then passed to the FlowExecution,
exposing external context attributes as input to the flow during startup. |
A request parameter mapper , which
exposes all request parameters in to the flow execution for input mapping. |
FlowDefinitionLocator
,
FlowExecutionFactory
,
FlowExecutionRepository
,
AttributeMapper
Constructor Summary | |
---|---|
FlowExecutorImpl(FlowDefinitionLocator definitionLocator,
FlowExecutionFactory executionFactory,
FlowExecutionRepository executionRepository)
Create a new flow executor. |
Method Summary | |
---|---|
protected MutableAttributeMap |
createInput(ExternalContext context)
Factory method that creates the input attribute map for a newly created FlowExecution . |
FlowDefinitionLocator |
getDefinitionLocator()
Exposes the configured flow definition locator to subclasses and privileged accessors. |
FlowExecutionFactory |
getExecutionFactory()
Exposes the configured execution factory to subclasses and privileged accessors. |
FlowExecutionRepository |
getExecutionRepository()
Exposes the execution repository to subclasses and privileged accessors. |
org.springframework.binding.mapping.AttributeMapper |
getInputMapper()
Exposes the configured input mapper to subclasses and privileged accessors. |
ResponseInstruction |
launch(java.lang.String flowDefinitionId,
ExternalContext context)
Launch a new execution of identified flow definition in the context of the current external client request. |
ResponseInstruction |
refresh(java.lang.String flowExecutionKey,
ExternalContext context)
Reissue the last response instruction issued by the flow execution. |
ResponseInstruction |
resume(java.lang.String flowExecutionKey,
java.lang.String eventId,
ExternalContext context)
Resume an existing, paused flow execution by signaling an event against its current state. |
void |
setInputMapper(org.springframework.binding.mapping.AttributeMapper inputMapper)
Set the service responsible for mapping attributes of an ExternalContext to a new FlowExecution
during the launch flow operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlowExecutorImpl(FlowDefinitionLocator definitionLocator, FlowExecutionFactory executionFactory, FlowExecutionRepository executionRepository)
definitionLocator
- the locator for accessing flow definitions to executeexecutionFactory
- the factory for creating executions of flow definitionsexecutionRepository
- the repository for persisting paused flow executionsMethod Detail |
---|
public org.springframework.binding.mapping.AttributeMapper getInputMapper()
public void setInputMapper(org.springframework.binding.mapping.AttributeMapper inputMapper)
ExternalContext
to a new FlowExecution
during the launch flow
operation.
The default implementation simply exposes all request parameters as flow execution input attributes. May be null.
RequestParameterInputMapper
public FlowDefinitionLocator getDefinitionLocator()
public FlowExecutionFactory getExecutionFactory()
public FlowExecutionRepository getExecutionRepository()
public ResponseInstruction launch(java.lang.String flowDefinitionId, ExternalContext context) throws FlowException
FlowExecutor
launch
in interface FlowExecutor
flowDefinitionId
- the unique id of the flow definition to launchcontext
- the external context representing the state of a request into Spring Web Flow from an external
system
FlowException
- if an exception occured launching the new flow executionpublic ResponseInstruction resume(java.lang.String flowExecutionKey, java.lang.String eventId, ExternalContext context) throws FlowException
FlowExecutor
resume
in interface FlowExecutor
flowExecutionKey
- the identifying key of a paused flow execution that is waiting to resume on the
occurrence of a user eventeventId
- the user event that occuredcontext
- the external context representing the state of a request into Spring Web Flow from an external
system
FlowException
- if an exception occured resuming the existing flow executionpublic ResponseInstruction refresh(java.lang.String flowExecutionKey, ExternalContext context) throws FlowException
FlowExecutor
refresh
in interface FlowExecutor
flowExecutionKey
- the identifying key of a paused flow execution that is waiting to resume on the ocurrence
of a user eventcontext
- the external context representing the state of a request into Spring Web Flow from an external
system
FlowException
- if an exception occured retrieving the current response instructionprotected MutableAttributeMap createInput(ExternalContext context)
FlowExecution
. This
implementation uses the registered input mapper, if any.
context
- the external context
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |