Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.webflow.execution.repository.snapshot
Class SerializedFlowExecutionSnapshotFactory

    java.lang.Object
      org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshotFactory

All Implemented Interfaces:
  FlowExecutionSnapshotFactory

    public class SerializedFlowExecutionSnapshotFactory

extends java.lang.Object
implements FlowExecutionSnapshotFactory

A factory that creates new instances of flow execution snapshots based on standard Java serialization.

Author:
  Keith Donald, Erwin Vervaet

Constructor Summary
`SerializedFlowExecutionSnapshotFactory(FlowExecutionFactory flowExecutionFactory, FlowDefinitionLocator flowDefinitionLocator)` Creates a new serialized flow execution snapshot factory

Method Summary
`FlowExecutionSnapshot` | `createSnapshot(FlowExecution flowExecution)` Takes a snapshot of the flow execution.
`boolean` | `getCompress()` Returns whether or not the snapshots should be compressed.
`FlowExecution` | `restoreExecution(FlowExecutionSnapshot snapshot, java.lang.String flowId, FlowExecutionKey key, MutableAttributeMap conversationScope, FlowExecutionKeyFactory keyFactory)` Restores a flow execution from a previously taken snapshot.
`void` | `setCompress(boolean compress)` Set whether or not the snapshots should be compressed.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SerializedFlowExecutionSnapshotFactory

    public SerializedFlowExecutionSnapshotFactory(FlowExecutionFactory flowExecutionFactory,
                                                  FlowDefinitionLocator flowDefinitionLocator)

  Creates a new serialized flow execution snapshot factory

  Parameters:
    `flowDefinitionLocator` - the flow definition locator
    `flowExecutionFactory` - the flow execution factory

Method Detail

### getCompress

    public boolean getCompress()

  Returns whether or not the snapshots should be compressed.

### setCompress

    public void setCompress(boolean compress)

  Set whether or not the snapshots should be compressed.

### createSnapshot

    public FlowExecutionSnapshot createSnapshot(FlowExecution flowExecution)
                                         throws SnapshotCreationException

  Description copied from interface: `FlowExecutionSnapshotFactory`
  Takes a snapshot of the flow execution.

  Specified by:
    `createSnapshot` in interface `FlowExecutionSnapshotFactory`
  Parameters:
    `flowExecution` - the flow execution
  Returns:
    the new snapshot
  Throws:
    `SnapshotCreationException` - if the snapshot could not be created

### restoreExecution

    public FlowExecution restoreExecution(FlowExecutionSnapshot snapshot,
                                          java.lang.String flowId,
                                          FlowExecutionKey key,
                                          MutableAttributeMap conversationScope,
                                          FlowExecutionKeyFactory keyFactory)
                                   throws FlowExecutionRestorationFailureException

  Description copied from interface: `FlowExecutionSnapshotFactory`
  Restores a flow execution from a previously taken snapshot.

  Specified by:
    `restoreExecution` in interface `FlowExecutionSnapshotFactory`
  Parameters:
    `snapshot` - the previously taken snapshot
    `flowId` - the id of the root flow definition
    `key` - the flow execution key
    `conversationScope` - conversation scope
    `keyFactory` - factory for creating new snapshot keys
  Returns:
    the restored flow execution
  Throws:
    `FlowExecutionRestorationFailureException` - if flow execution restoration fails

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD