org.springframework.batch.core.repository.dao

## Class XStreamExecutionContextStringSerializer

- java.lang.Object
- - org.springframework.batch.core.repository.dao.XStreamExecutionContextStringSerializer

- All Implemented Interfaces:
    ExecutionContextSerializer, org.springframework.beans.factory.InitializingBean, org.springframework.core.serializer.Deserializer<java.util.Map<java.lang.String,java.lang.Object>>, org.springframework.core.serializer.Serializer<java.util.Map<java.lang.String,java.lang.Object>>

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

  Implementation that uses XStream and Jettison to provide serialization.
  Since:
    2.0
  Author:
    Thomas Risberg, Michael Minella
  See Also:
    `ExecutionContextSerializer`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XStreamExecutionContextStringSerializer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterPropertiesSet()`
    `java.util.Map<java.lang.String,java.lang.Object>` | `deserialize(java.io.InputStream in)` Deserializes the supplied input stream into a new execution context.
    `void` | `init()`
    `void` | `serialize(java.util.Map<java.lang.String,java.lang.Object> context, java.io.OutputStream out)` Serializes the passed execution context to the supplied OutputStream.
    `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

    - #### 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`

    - #### serialize

          public void serialize(java.util.Map<java.lang.String,java.lang.Object> context,
                                java.io.OutputStream out)
                         throws java.io.IOException

      Serializes the passed execution context to the supplied OutputStream.
      Specified by:
        `serialize` in interface `org.springframework.core.serializer.Serializer<java.util.Map<java.lang.String,java.lang.Object>>`
      Parameters:
        `context` -
        `out` -
      Throws:
        `java.io.IOException`
      See Also:
        `Serializer.serialize(Object, OutputStream)`

    - #### deserialize

          public java.util.Map<java.lang.String,java.lang.Object> deserialize(java.io.InputStream in)
                                                                       throws java.io.IOException

      Deserializes the supplied input stream into a new execution context.
      Specified by:
        `deserialize` in interface `org.springframework.core.serializer.Deserializer<java.util.Map<java.lang.String,java.lang.Object>>`
      Parameters:
        `in` -
      Returns:
        a reconstructed execution context
      Throws:
        `java.io.IOException`
      See Also:
        `Deserializer.deserialize(InputStream)`