org.springframework.integration.transformer
Class PayloadSerializingTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.AbstractPayloadTransformer<T,U>
org.springframework.integration.transformer.PayloadTypeConvertingTransformer<java.lang.Object,byte[]>
org.springframework.integration.transformer.PayloadSerializingTransformer
- 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 PayloadSerializingTransformer
- extends PayloadTypeConvertingTransformer<java.lang.Object,byte[]>
Transformer that serializes the inbound payload into a byte array by delegating to a
Converter<Object, byte[]>. Default delegate is a SerializingConverter
using
Java serialization.
The payload instance must be Serializable if the default converter is used.
- Since:
- 1.0.1
- Author:
- Mark Fisher, Gary Russell
Method Summary |
void |
setSerializer(org.springframework.core.serializer.Serializer<java.lang.Object> serializer)
|
protected byte[] |
transformPayload(java.lang.Object payload)
|
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 |
PayloadSerializingTransformer
public PayloadSerializingTransformer()
setSerializer
public void setSerializer(org.springframework.core.serializer.Serializer<java.lang.Object> serializer)
transformPayload
protected byte[] transformPayload(java.lang.Object payload)
throws java.lang.Exception
- Overrides:
transformPayload
in class PayloadTypeConvertingTransformer<java.lang.Object,byte[]>
- Throws:
java.lang.Exception