org.springframework.batch.core.repository.dao
Class XStreamExecutionContextStringSerializer

java.lang.Object
  extended by org.springframework.batch.core.repository.dao.XStreamExecutionContextStringSerializer
All Implemented Interfaces:
ExecutionContextStringSerializer, org.springframework.beans.factory.InitializingBean

public class XStreamExecutionContextStringSerializer
extends java.lang.Object
implements ExecutionContextStringSerializer, org.springframework.beans.factory.InitializingBean

Implementation that uses XStream and Jettison to provide serialization.

Since:
2.0
Author:
Thomas Risberg

Constructor Summary
XStreamExecutionContextStringSerializer()
           
 
Method Summary
 void afterPropertiesSet()
           
 java.util.Map<java.lang.String,java.lang.Object> deserialize(java.lang.String context)
          De-serialize the context from a string representation
 void init()
           
 java.lang.String serialize(java.util.Map<java.lang.String,java.lang.Object> context)
          Serialize the context to a string representation
 void setHierarchicalStreamDriver(com.thoughtworks.xstream.io.HierarchicalStreamDriver hierarchicalStreamDriver)
           
 void setReflectionProvider(com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XStreamExecutionContextStringSerializer

public XStreamExecutionContextStringSerializer()
Method Detail

serialize

public java.lang.String serialize(java.util.Map<java.lang.String,java.lang.Object> context)
Description copied from interface: ExecutionContextStringSerializer
Serialize the context to a string representation

Specified by:
serialize in interface ExecutionContextStringSerializer
Parameters:
context - the object that should be serialized
Returns:
the serialization string

deserialize

public java.util.Map<java.lang.String,java.lang.Object> deserialize(java.lang.String context)
Description copied from interface: ExecutionContextStringSerializer
De-serialize the context from a string representation

Specified by:
deserialize in interface ExecutionContextStringSerializer
Parameters:
context - the serialization string that should be de-serialized
Returns:
the de-serialized context map

setReflectionProvider

public void setReflectionProvider(com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)

setHierarchicalStreamDriver

public void setHierarchicalStreamDriver(com.thoughtworks.xstream.io.HierarchicalStreamDriver hierarchicalStreamDriver)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

init

public void init()
          throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2009. All Rights Reserved.