Class DefaultFlowHolder
java.lang.Object
org.springframework.webflow.engine.builder.DefaultFlowHolder
- All Implemented Interfaces:
FlowDefinitionHolder
A flow definition holder that can detect changes on an underlying flow definition resource and refresh that resource
automatically.
This class is thread-safe.
Note that this FlowDefinition
holder uses a FlowAssembler
. This class bridges the abstract
world of flow definitions
with the concrete world of flow implementations.
- Author:
- Keith Donald
- See Also:
-
Constructor Summary
ConstructorDescriptionDefaultFlowHolder
(FlowAssembler assembler) Creates a new refreshable flow definition holder that uses the configured assembler (GOF director) to drive flow assembly, on initial use and on any resource change or refresh. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Indicates that the system is being shutdown and any resources flow resources should be released.Returns the flow definition held by this holder.Returns theid
of the flow definition held by this holder.Returns a descriptive string that identifies the source of this FlowDefinition.void
refresh()
Refresh the flow definition held by this holder.toString()
-
Constructor Details
-
DefaultFlowHolder
Creates a new refreshable flow definition holder that uses the configured assembler (GOF director) to drive flow assembly, on initial use and on any resource change or refresh.- Parameters:
assembler
- the flow assembler to use
-
-
Method Details
-
getFlowDefinitionId
Description copied from interface:FlowDefinitionHolder
Returns theid
of the flow definition held by this holder. This is a lightweight method callers may call to obtain the id of the flow without triggering full flow definition assembly (which may be an expensive operation).- Specified by:
getFlowDefinitionId
in interfaceFlowDefinitionHolder
-
getFlowDefinitionResourceString
Description copied from interface:FlowDefinitionHolder
Returns a descriptive string that identifies the source of this FlowDefinition. This is also a lightweight method callers may call to obtain the logical resource where the flow definition resides without triggering flow definition assembly. Used for informational purposes.- Specified by:
getFlowDefinitionResourceString
in interfaceFlowDefinitionHolder
- Returns:
- the flow definition resource string
-
getFlowDefinition
Description copied from interface:FlowDefinitionHolder
Returns the flow definition held by this holder. Calling this method the first time may trigger flow assembly (which may be expensive).- Specified by:
getFlowDefinition
in interfaceFlowDefinitionHolder
- Throws:
FlowDefinitionConstructionException
- if there is a problem constructing the target flow definition
-
refresh
Description copied from interface:FlowDefinitionHolder
Refresh the flow definition held by this holder. Calling this method typically triggers flow re-assembly, which may include a refresh from an externalized resource such as a file.- Specified by:
refresh
in interfaceFlowDefinitionHolder
- Throws:
FlowDefinitionConstructionException
- if there is a problem constructing the target flow definition
-
destroy
public void destroy()Description copied from interface:FlowDefinitionHolder
Indicates that the system is being shutdown and any resources flow resources should be released. After this method is called, calls toFlowDefinitionHolder.getFlowDefinition()
are undefined. Should only be called once. May be a no-op if the held flow was never constructed to begin with.- Specified by:
destroy
in interfaceFlowDefinitionHolder
-
toString
-