org.springframework.webflow.execution.repository.snapshot
Class SerializedFlowExecutionSnapshot

java.lang.Object
  extended by org.springframework.webflow.execution.repository.snapshot.FlowExecutionSnapshot
      extended by org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot
All Implemented Interfaces:
Externalizable, Serializable

public class SerializedFlowExecutionSnapshot
extends FlowExecutionSnapshot
implements Externalizable

A snapshot implementation that is based on standard Java serialization, created by a SerializedFlowExecutionSnapshotFactory.

Author:
Keith Donald, Erwin Vervaet
See Also:
SerializedFlowExecutionSnapshotFactory, Serialized Form

Constructor Summary
SerializedFlowExecutionSnapshot()
          Default constructor necessary for Externalizable custom serialization semantics.
SerializedFlowExecutionSnapshot(FlowExecution flowExecution, boolean compress)
          Creates a new serialized flow execution snapshot.
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 boolean isCompressed()
          Returns whether or not the flow execution data in this snapshot is compressed.
 void readExternal(ObjectInput in)
           
 FlowExecution unmarshal(ClassLoader classLoader)
          Unmarshal the flow execution from this snapshot's data.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializedFlowExecutionSnapshot

public SerializedFlowExecutionSnapshot()
Default constructor necessary for Externalizable custom serialization semantics. Should not be called by application code.


SerializedFlowExecutionSnapshot

public SerializedFlowExecutionSnapshot(FlowExecution flowExecution,
                                       boolean compress)
                                throws SnapshotCreationException
Creates a new serialized flow execution snapshot.

Parameters:
flowExecution - the flow execution
compress - whether or not to apply compression during snapshotting
Throws:
SnapshotCreationException
Method Detail

isCompressed

public boolean isCompressed()
Returns whether or not the flow execution data in this snapshot is compressed.


unmarshal

public FlowExecution unmarshal(ClassLoader classLoader)
                        throws SnapshotUnmarshalException
Unmarshal the flow execution from this snapshot's data.

Parameters:
classLoader - the classloader to use to resolve types during execution deserialization
Returns:
the unmarashalled flow execution
Throws:
SnapshotUnmarshalException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException