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.
|
transform
afterPropertiesSet, 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, toString
public SimpleFromAvroTransformer(Class<? extends org.apache.avro.specific.SpecificRecord> defaultType)
defaultType
- the type.public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
public 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()
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
protected Object doTransform(Message<?> message)
AbstractTransformer
doTransform
in class AbstractTransformer
message
- The message.