|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FlowExecutionRepository
Central subsystem interface responsible for the saving and restoring of flow executions, where each flow execution represents a state of an active flow definition.
Flow execution repositories are responsible for managing the storage, restoration and removal of flow executions launched by clients of the Spring Web Flow system.
When placed in a repository a FlowExecution
object representing the state of a flow at a point in time is
indexed under a unique FlowExecutionKey
.
FlowExecution
,
FlowExecutionKey
Method Summary | |
---|---|
FlowExecution |
getFlowExecution(FlowExecutionKey key)
Return the FlowExecution indexed by the provided key. |
FlowExecutionLock |
getLock(FlowExecutionKey key)
Return the lock for the flow execution, allowing for the lock to be acquired or released. |
FlowExecutionKey |
parseFlowExecutionKey(java.lang.String encodedKey)
Parse the string-encoded flow execution key into its object form. |
void |
putFlowExecution(FlowExecution flowExecution)
Place the FlowExecution in this repository under the provided key. |
void |
removeFlowExecution(FlowExecution flowExecution)
Remove the flow execution from the repository. |
Method Detail |
---|
FlowExecutionKey parseFlowExecutionKey(java.lang.String encodedKey) throws FlowExecutionRepositoryException
FlowExecutionKey.toString()
.
encodedKey
- the string encoded key
FlowExecutionRepositoryException
FlowExecutionLock getLock(FlowExecutionKey key) throws FlowExecutionRepositoryException
FlowExecutionLock lock = repository.getLock(key); lock.lock(); try { FlowExecution execution = repository.getFlowExecution(key); // do work } finally { lock.unlock(); }
key
- the identifier of the flow execution to lock
FlowExecutionRepositoryException
- a problem occurred accessing the lock objectFlowExecution getFlowExecution(FlowExecutionKey key) throws FlowExecutionRepositoryException
FlowExecution
indexed by the provided key. The returned flow execution represents the
restored state of an executing flow from a point in time. This should be called to resume a persistent flow
execution. Before calling this method, you should acquire the lock for the keyed flow execution.
key
- the flow execution key
FlowExecutionRepositoryException
- if no flow execution was indexed with the key providedvoid putFlowExecution(FlowExecution flowExecution) throws FlowExecutionRepositoryException
FlowExecution
in this repository under the provided key. This should be called to save or
update the persistent state of an active (but paused) flow execution. Before calling this method, you should
acquire the lock for the keyed flow execution.
flowExecution
- the flow execution
FlowExecutionRepositoryException
- the flow execution could not be storedvoid removeFlowExecution(FlowExecution flowExecution) throws FlowExecutionRepositoryException
flowExecution
- the flow execution
FlowExecutionRepositoryException
- the flow execution could not be removed.
|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |