|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.webflow.config.FlowExecutorFactoryBean
public class FlowExecutorFactoryBean
The default flow executor factory implementation. As a FactoryBean
, this class has been designed for
use as a Spring managed bean.
This factory encapsulates the construction and assembly of a FlowExecutor
, including the provision of its
FlowExecutionRepository
strategy.
The definition locator
property is required, all other
properties are optional.
This class has been designed with subclassing in mind. If you want to do advanced Spring Web Flow customization, e.g.
using a custom FlowExecutor
implementation, consider subclassing this
class and overriding one or more of the provided hook methods.
Constructor Summary | |
---|---|
FlowExecutorFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected ConversationManager |
createDefaultConversationManager()
Create the conversation manager to be used in the default case, e.g. |
protected FlowExecutionRepository |
createExecutionRepository(RepositoryType repositoryType,
FlowExecutionStateRestorer executionStateRestorer,
ConversationManager conversationManager)
Factory method for creating the flow execution repository for saving and loading executing flows. |
protected FlowExecutionFactory |
createFlowExecutionFactory(AttributeMap executionAttributes,
FlowExecutionListenerLoader executionListenerLoader)
Create the flow execution factory to be used by the executor produced by this factory bean. |
protected FlowExecutionStateRestorer |
createFlowExecutionStateRestorer(FlowDefinitionLocator definitionLocator,
AttributeMap executionAttributes,
FlowExecutionListenerLoader executionListenerLoader)
Create the flow execution state restorer to be used by the executor produced by this factory bean. |
protected FlowExecutor |
createFlowExecutor(FlowDefinitionLocator definitionLocator,
FlowExecutionFactory executionFactory,
FlowExecutionRepository executionRepository)
Create the flow executor instance created by this factory bean and configure it appropriately. |
FlowExecutor |
getFlowExecutor()
Returns the flow executor constructed by the factory bean. |
protected org.springframework.binding.mapping.AttributeMapper |
getInputMapper()
Return the configured input mapper. |
protected java.lang.Integer |
getMaxContinuations()
Returns the configured maximum number of continuation snapshots allowed for a single conversation when using the continuation flow execution repository. |
protected java.lang.Integer |
getMaxConversations()
Returns the configured maximum number of allowed concurrent conversations in the session. |
java.lang.Object |
getObject()
|
java.lang.Class |
getObjectType()
|
boolean |
isSingleton()
|
void |
setConversationManager(ConversationManager conversationManager)
Sets the strategy for managing conversations that should be configured for flow executors created by this factory. |
void |
setDefaults(FlowSystemDefaults defaults)
Set system defaults that should be used. |
void |
setDefinitionLocator(FlowDefinitionLocator definitionLocator)
Sets the flow definition locator that will locate flow definitions needed for execution. |
void |
setExecutionAttributes(java.util.Map executionAttributes)
Sets the system attributes that apply to flow executions launched by the executor created by this factory. |
void |
setExecutionListener(FlowExecutionListener executionListener)
Convenience setter that sets a single listener that always applies to flow executions launched by the executor created by this factory. |
void |
setExecutionListenerLoader(FlowExecutionListenerLoader executionListenerLoader)
Sets the strategy for loading the listeners that will observe executions of a flow definition. |
void |
setExecutionListeners(FlowExecutionListener[] executionListeners)
Convenience setter that sets a list of listeners that always apply to flow executions launched by the executor created by this factory. |
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. |
void |
setMaxContinuations(int maxContinuations)
Set the maximum number of continuation snapshots allowed for a single conversation when using the continuation flow execution repository. |
void |
setMaxConversations(int maxConversations)
Set the maximum number of allowed concurrent conversations in the session. |
void |
setRepositoryType(RepositoryType repositoryType)
Sets the type of flow execution repository that should be configured for the flow executors created by this factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlowExecutorFactoryBean()
Method Detail |
---|
public void setDefinitionLocator(FlowDefinitionLocator definitionLocator)
FlowDefinitionRegistry
. Required.
definitionLocator
- the flow definition locator (registry)public void setExecutionAttributes(java.util.Map executionAttributes)
Note: this method simply accepts a generic java.util.Map
to allow for easy configuration by
Spring. The map entries should consist of non-null String keys with object values.
executionAttributes
- the flow execution system attributespublic void setExecutionListener(FlowExecutionListener executionListener)
executionListener
- the flow execution listenerpublic void setExecutionListeners(FlowExecutionListener[] executionListeners)
executionListeners
- the flow execution listenerspublic void setExecutionListenerLoader(FlowExecutionListenerLoader executionListenerLoader)
public void setRepositoryType(RepositoryType repositoryType)
repositoryType
- the flow execution repository typepublic void setMaxContinuations(int maxContinuations)
continuation
flow execution repository.
ContinuationFlowExecutionRepository.setMaxContinuations(int)
protected java.lang.Integer getMaxContinuations()
continuation
flow execution repository.
public void setConversationManager(ConversationManager conversationManager)
The conversation manager is used by the flow execution repository subsystem to begin and end new conversations that store execution state.
By default, a SessionBindingConversationManager
is used. Do not use setMaxConversations(int)
when using this method.
public void setMaxConversations(int maxConversations)
SessionBindingConversationManager
. Do
not use this when using setConversationManager(ConversationManager)
.
SessionBindingConversationManager.setMaxConversations(int)
protected java.lang.Integer getMaxConversations()
setConversationManager(ConversationManager)
.
public void setInputMapper(org.springframework.binding.mapping.AttributeMapper inputMapper)
ExternalContext
to a new FlowExecution
during the launch flow
operation.
This is optional. If not set, a default implementation will be used that simply exposes all request parameters as flow execution input attributes.
protected org.springframework.binding.mapping.AttributeMapper getInputMapper()
public void setDefaults(FlowSystemDefaults defaults)
defaults
- the defaults to use.public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
protected ConversationManager createDefaultConversationManager()
setConversationManager(ConversationManager)
. This implementation return a
SessionBindingConversationManager
.
protected FlowExecutionFactory createFlowExecutionFactory(AttributeMap executionAttributes, FlowExecutionListenerLoader executionListenerLoader)
executionAttributes
- execution attributes to apply to created executionsexecutionListenerLoader
- decides which listeners to apply to created executions
protected FlowExecutionStateRestorer createFlowExecutionStateRestorer(FlowDefinitionLocator definitionLocator, AttributeMap executionAttributes, FlowExecutionListenerLoader executionListenerLoader)
definitionLocator
- the definition locator to useexecutionAttributes
- execution attributes to apply to restored executionsexecutionListenerLoader
- decides which listeners should apply to restored flow executions
protected FlowExecutionRepository createExecutionRepository(RepositoryType repositoryType, FlowExecutionStateRestorer executionStateRestorer, ConversationManager conversationManager)
repositoryType
- a hint indicating what type of repository to createexecutionStateRestorer
- the execution state restorer strategy to be used by the repositoryconversationManager
- the conversation manager specified by the user, could be null in which case the
default conversation manager should be used
protected FlowExecutor createFlowExecutor(FlowDefinitionLocator definitionLocator, FlowExecutionFactory executionFactory, FlowExecutionRepository executionRepository)
definitionLocator
- the definition locator to useexecutionFactory
- the execution factory to useexecutionRepository
- the execution repository to use
public java.lang.Class getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean
public java.lang.Object getObject() throws java.lang.Exception
getObject
in interface org.springframework.beans.factory.FactoryBean
java.lang.Exception
public FlowExecutor getFlowExecutor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |