org.springframework.integration.json
Class JsonToObjectTransformer<T>
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.AbstractPayloadTransformer<java.lang.String,T>
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
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 |
JsonToObjectTransformer
public JsonToObjectTransformer(java.lang.Class<T> targetClass)
JsonToObjectTransformer
public JsonToObjectTransformer(java.lang.Class<T> targetClass,
org.codehaus.jackson.map.ObjectMapper objectMapper)
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