Spring Integration

org.springframework.integration.json
Class JsonToObjectTransformer<T>

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.transformer.AbstractTransformer
          extended by org.springframework.integration.transformer.AbstractPayloadTransformer<java.lang.String,T>
              extended by org.springframework.integration.json.JsonToObjectTransformer<T>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent, Transformer

public class JsonToObjectTransformer<T>
extends AbstractPayloadTransformer<java.lang.String,T>

Transformer implementation that converts a JSON string payload into an instance of the provided target Class.

Since:
2.0
Author:
Mark Fisher

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
JsonToObjectTransformer(java.lang.Class<T> targetClass)
           
JsonToObjectTransformer(java.lang.Class<T> targetClass, org.codehaus.jackson.map.ObjectMapper objectMapper)
           
 
Method Summary
protected  T transformPayload(java.lang.String payload)
           
 
Methods inherited from class org.springframework.integration.transformer.AbstractPayloadTransformer
doTransform
 
Methods inherited from class org.springframework.integration.transformer.AbstractTransformer
transform
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonToObjectTransformer

public JsonToObjectTransformer(java.lang.Class<T> targetClass)

JsonToObjectTransformer

public JsonToObjectTransformer(java.lang.Class<T> targetClass,
                               org.codehaus.jackson.map.ObjectMapper objectMapper)
Method Detail

transformPayload

protected T transformPayload(java.lang.String payload)
                      throws java.lang.Exception
Specified by:
transformPayload in class AbstractPayloadTransformer<java.lang.String,T>
Throws:
java.lang.Exception

Spring Integration