public class SimpleFromAvroTransformer extends AbstractTransformer implements BeanClassLoaderAware
SpecificRecord objects
from byte[].EXPRESSION_PARSER, logger| Constructor and Description |
|---|
SimpleFromAvroTransformer(Class<? extends org.apache.avro.specific.SpecificRecord> defaultType)
Construct an instance with the supplied default type to create.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doTransform(Message<?> message)
Subclasses must implement this method to provide the transformation
logic.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setTypeExpression(Expression expression)
Set the expression to evaluate against the message to determine the type.
|
void |
setTypeExpressionString(String expression)
Set the expression to evaluate against the message to determine the type id.
|
SimpleFromAvroTransformer |
typeExpression(Expression expression)
Set the expression to evaluate against the message to determine the type.
|
SimpleFromAvroTransformer |
typeExpression(String expression)
Set the expression to evaluate against the message to determine the type id.
|
transformafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringpublic SimpleFromAvroTransformer(Class<? extends org.apache.avro.specific.SpecificRecord> defaultType)
defaultType - the type.public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic SimpleFromAvroTransformer typeExpression(Expression expression)
headers['avro_type'].expression - the expression.public SimpleFromAvroTransformer typeExpression(String expression)
headers['avro_type'].expression - the expression.public void setTypeExpression(Expression expression)
headers['avro_type'].expression - the expression.public void setTypeExpressionString(String expression)
headers['avro_type'].expression - the expression.protected void onInit()
IntegrationObjectSupportonInit in class IntegrationObjectSupportprotected Object doTransform(Message<?> message)
AbstractTransformerdoTransform in class AbstractTransformermessage - The message.