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,
java.lang.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, java.lang.Class<T> type)
codec
- the codec.type
- the type.public DecodingTransformer(Codec codec, org.springframework.expression.Expression typeExpression)
codec
- the codec.typeExpression
- an expression that evaluates to a Class
.public void setEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext evaluationContext)
protected void onInit() throws java.lang.Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
java.lang.Exception
- Any exception.protected T doTransform(org.springframework.messaging.Message<?> message) throws java.lang.Exception
AbstractTransformer
doTransform
in class AbstractTransformer
message
- The message.java.lang.Exception
- Any exception.