public class DecodingTransformer<T> extends AbstractTransformer
AbstractPayloadTransformer
that delegates to a codec to decode the
payload from a byte[].logger
Constructor and Description |
---|
DecodingTransformer(Codec codec,
Class<T> type)
Construct an instance to use the supplied codec to decode to the supplied type.
|
DecodingTransformer(Codec codec,
Expression typeExpression)
Construct an instance to use the supplied codec to decode to the supplied type.
|
Modifier and Type | Method and Description |
---|---|
protected T |
doTransform(Message<?> message)
Subclasses must implement this method to provide the transformation
logic.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setEvaluationContext(StandardEvaluationContext evaluationContext) |
transform
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
public DecodingTransformer(Codec codec, Class<T> type)
codec
- the codec.type
- the type.public DecodingTransformer(Codec codec, Expression typeExpression)
codec
- the codec.typeExpression
- an expression that evaluates to a Class
.public void setEvaluationContext(StandardEvaluationContext evaluationContext)
protected void onInit() throws Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
Exception
- Any exception.protected T doTransform(Message<?> message) throws Exception
AbstractTransformer
doTransform
in class AbstractTransformer
message
- The message.Exception
- Any exception.