Interface FlowDefinitionHolder
- All Known Implementing Classes:
DefaultFlowHolder
public interface FlowDefinitionHolder
A holder holding a reference to a Flow definition. Provides a layer of indirection, enabling things like
"hot-reloadable" flow definitions.
- Author:
- Keith Donald
- See Also:
-
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.
-
Method Details
-
getFlowDefinitionId
String getFlowDefinitionId()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). -
getFlowDefinitionResourceString
String getFlowDefinitionResourceString()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.- Returns:
- the flow definition resource string
-
getFlowDefinition
Returns the flow definition held by this holder. Calling this method the first time may trigger flow assembly (which may be expensive).- Throws:
FlowDefinitionConstructionException
- if there is a problem constructing the target flow definition
-
refresh
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.- Throws:
FlowDefinitionConstructionException
- if there is a problem constructing the target flow definition
-
destroy
void destroy()Indicates that the system is being shutdown and any resources flow resources should be released. After this method is called, calls togetFlowDefinition()
are undefined. Should only be called once. May be a no-op if the held flow was never constructed to begin with.
-