Spring Integration

org.springframework.integration.transformer
Class PayloadSerializingTransformer

java.lang.Object
  extended by org.springframework.integration.transformer.AbstractTransformer
      extended by org.springframework.integration.transformer.AbstractPayloadTransformer<T,U>
          extended by org.springframework.integration.transformer.PayloadTypeConvertingTransformer<Object,byte[]>
              extended by org.springframework.integration.transformer.PayloadSerializingTransformer
All Implemented Interfaces:
Transformer

public class PayloadSerializingTransformer
extends PayloadTypeConvertingTransformer<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

Field Summary
 
Fields inherited from class org.springframework.integration.transformer.PayloadTypeConvertingTransformer
converter
 
Constructor Summary
PayloadSerializingTransformer()
           
 
Method Summary
 void setConverter(Converter<Object,byte[]> converter)
          Sets the converter to be used for Serialization.
protected  byte[] transformPayload(Object 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PayloadSerializingTransformer

public PayloadSerializingTransformer()
Method Detail

transformPayload

protected byte[] transformPayload(Object payload)
                           throws Exception
Overrides:
transformPayload in class PayloadTypeConvertingTransformer<Object,byte[]>
Throws:
Exception

setConverter

public void setConverter(Converter<Object,byte[]> converter)
Description copied from class: PayloadTypeConvertingTransformer
Sets the converter to be used for Serialization.

Overrides:
setConverter in class PayloadTypeConvertingTransformer<Object,byte[]>
Parameters:
converter - The Converter.

Spring Integration

Copyright © 2010. All Rights Reserved.