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

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

public class XStreamExecutionContextStringSerializer
extends Object
implements ExecutionContextStringSerializer, InitializingBean

Implementation that uses XStream and Jettison to provide serialization.

Since:
2.0
Author:
Thomas Risberg

Constructor Summary
XStreamExecutionContextStringSerializer()
           
 
Method Summary
 void afterPropertiesSet()
           
 Map<String,Object> deserialize(String context)
          De-serialize the context from a string representation
 void init()
           
 String serialize(Map<String,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 String serialize(Map<String,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 Map<String,Object> deserialize(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 Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

init

public void init()
          throws Exception
Throws:
Exception


Copyright © 2013 SpringSource. All Rights Reserved.