public class DecodingTransformer<T> extends AbstractTransformer
AbstractPayloadTransformer
that delegates to a codec to decode the
payload from a byte[].EXPRESSION_PARSER, 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,
org.springframework.expression.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(org.springframework.messaging.Message<?> message)
Subclasses must implement this method to provide the transformation
logic.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext evaluationContext) |
transform
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
public DecodingTransformer(Codec codec, Class<T> type)
codec
- the codec.type
- the type.public void setEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext evaluationContext)
protected void onInit() throws Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
Exception
- Any exception.protected T doTransform(org.springframework.messaging.Message<?> message) throws Exception
AbstractTransformer
doTransform
in class AbstractTransformer
message
- The message.Exception
- Any exception.