public class DefaultFlowHolder extends java.lang.Object implements FlowDefinitionHolder
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.
FlowAssembler,
FlowDefinition| Constructor and Description |
|---|
DefaultFlowHolder(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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Indicates that the system is being shutdown and any resources flow resources should be released.
|
FlowDefinition |
getFlowDefinition()
Returns the flow definition held by this holder.
|
java.lang.String |
getFlowDefinitionId()
Returns the
id of the flow definition held by this holder. |
java.lang.String |
getFlowDefinitionResourceString()
Returns a descriptive string that identifies the source of this FlowDefinition.
|
void |
refresh()
Refresh the flow definition held by this holder.
|
java.lang.String |
toString() |
public DefaultFlowHolder(FlowAssembler assembler)
assembler - the flow assembler to usepublic java.lang.String getFlowDefinitionId()
FlowDefinitionHolderid 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).getFlowDefinitionId in interface FlowDefinitionHolderpublic java.lang.String getFlowDefinitionResourceString()
FlowDefinitionHoldergetFlowDefinitionResourceString in interface FlowDefinitionHolderpublic FlowDefinition getFlowDefinition() throws FlowDefinitionConstructionException
FlowDefinitionHoldergetFlowDefinition in interface FlowDefinitionHolderFlowDefinitionConstructionException - if there is a problem constructing the target flow definitionpublic void refresh()
throws FlowDefinitionConstructionException
FlowDefinitionHolderrefresh in interface FlowDefinitionHolderFlowDefinitionConstructionException - if there is a problem constructing the target flow definitionpublic void destroy()
FlowDefinitionHolderFlowDefinitionHolder.getFlowDefinition() are undefined. Should only be called once. May be a no-op
if the held flow was never constructed to begin with.destroy in interface FlowDefinitionHolderpublic java.lang.String toString()
toString in class java.lang.Object