org.springframework.integration.transformer
Class PayloadSerializingTransformer

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.transformer.AbstractTransformer
          extended by org.springframework.integration.transformer.AbstractPayloadTransformer<T,U>
              extended by org.springframework.integration.transformer.PayloadTypeConvertingTransformer<java.lang.Object,byte[]>
                  extended by org.springframework.integration.transformer.PayloadSerializingTransformer
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, 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

Field Summary
 
Fields inherited from class org.springframework.integration.transformer.PayloadTypeConvertingTransformer
converter
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
PayloadSerializingTransformer()
           
 
Method Summary
 void setSerializer(Serializer<java.lang.Object> serializer)
           
protected  byte[] transformPayload(java.lang.Object payload)
           
 
Methods inherited from class org.springframework.integration.transformer.PayloadTypeConvertingTransformer
setConverter
 
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

PayloadSerializingTransformer

public PayloadSerializingTransformer()
Method Detail

setSerializer

public void setSerializer(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