org.springframework.webflow.execution.servlet
Class HttpSessionContinuationFlowExecutionStorage

java.lang.Object
  extended by org.springframework.webflow.execution.servlet.HttpSessionFlowExecutionStorage
      extended by org.springframework.webflow.execution.servlet.HttpSessionContinuationFlowExecutionStorage
All Implemented Interfaces:
FlowExecutionStorage

public class HttpSessionContinuationFlowExecutionStorage
extends HttpSessionFlowExecutionStorage

Flow execution storage that stores flow executions as continuations in the HttpSession.

A downside of this storage strategy (and of server-side continuations in general) is that there could be many copies of the flow execution stored in the HTTP session, increasing server memory requirements. It is advised that you use the ExpiredFlowCleanupFilter to cleanup any flow execution continuations as soon as they can be considered to have expired.

This storage strategy requires a ServletEvent.

Author:
Erwin Vervaet
See Also:
ExpiredFlowCleanupFilter, ServletEvent

Field Summary
 
Fields inherited from class org.springframework.webflow.execution.servlet.HttpSessionFlowExecutionStorage
logger
 
Constructor Summary
HttpSessionContinuationFlowExecutionStorage()
           
 
Method Summary
 boolean isCompress()
          Returns whether or not continuations should be compressed.
 FlowExecution load(java.io.Serializable id, Event requestingEvent)
          Load an existing flow execution, identified by given unique id, from the storage.
 void remove(java.io.Serializable id, Event requestingEvent)
          Remove the identified flow execution from the storage.
 java.io.Serializable save(java.io.Serializable id, FlowExecution flowExecution, Event requestingEvent)
          Save given flow execution in the storage.
 void setCompress(boolean compress)
          Set whether or not continuations should be compressed.
 
Methods inherited from class org.springframework.webflow.execution.servlet.HttpSessionFlowExecutionStorage
attributeName, createId, isCreateSession, setCreateSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpSessionContinuationFlowExecutionStorage

public HttpSessionContinuationFlowExecutionStorage()
Method Detail

isCompress

public boolean isCompress()
Returns whether or not continuations should be compressed.


setCompress

public void setCompress(boolean compress)
Set whether or not continuations should be compressed.


load

public FlowExecution load(java.io.Serializable id,
                          Event requestingEvent)
                   throws NoSuchFlowExecutionException,
                          FlowExecutionStorageException
Description copied from interface: FlowExecutionStorage
Load an existing flow execution, identified by given unique id, from the storage.

Specified by:
load in interface FlowExecutionStorage
Overrides:
load in class HttpSessionFlowExecutionStorage
Parameters:
id - the unique id of the flow execution, as returned by the save method
requestingEvent - the event requesting the load of the flow execution
Returns:
the loaded flow execution
Throws:
NoSuchFlowExecutionException - when there is no flow execution with specified id in the storage
FlowExecutionStorageException - when there is a technical problem accessing the flow execution storage

save

public java.io.Serializable save(java.io.Serializable id,
                                 FlowExecution flowExecution,
                                 Event requestingEvent)
                          throws FlowExecutionStorageException
Description copied from interface: FlowExecutionStorage
Save given flow execution in the storage.

Specified by:
save in interface FlowExecutionStorage
Overrides:
save in class HttpSessionFlowExecutionStorage
Parameters:
id - the unique id of the flow execution, or null if the flow execution does not yet have an id (e.g. was not previously saved)
flowExecution - the flow execution to save
requestingEvent - the event requesting the save of the flow execution
Returns:
the unique id that actually identifies the saved flow execution, this could be different from the id passed into the method
Throws:
FlowExecutionStorageException - when there is a technical problem accessing the flow execution storage

remove

public void remove(java.io.Serializable id,
                   Event requestingEvent)
            throws FlowExecutionStorageException
Description copied from interface: FlowExecutionStorage
Remove the identified flow execution from the storage.

Specified by:
remove in interface FlowExecutionStorage
Overrides:
remove in class HttpSessionFlowExecutionStorage
Parameters:
id - the unique id of the flow execution, as returned by the save method
requestingEvent - the event requesting the remove of the flow execution
Throws:
FlowExecutionStorageException - when there is a technical problem accessing the flow execution storage


Copyright © 2005. All Rights Reserved.