Class SimpleFromAvroTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.SimpleFromAvroTransformer
- All Implemented Interfaces:
- Aware,- BeanClassLoaderAware,- BeanFactoryAware,- BeanNameAware,- InitializingBean,- ApplicationContextAware,- ExpressionCapable,- GenericTransformer<Message<?>,,- Message<?>> - NamedComponent,- Transformer
An Apache Avro transformer to create generated 
SpecificRecord objects
 from byte[].- Since:
- 5.2
- Author:
- Gary Russell, Artem Bilan
- 
Field SummaryFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, logger
- 
Constructor SummaryConstructorsConstructorDescriptionSimpleFromAvroTransformer(Class<? extends org.apache.avro.specific.SpecificRecord> defaultType) Construct an instance with the supplied default type to create.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ObjectdoTransform(Message<?> message) Subclasses must implement this method to provide the transformation logic.protected voidonInit()Subclasses may implement this for initialization logic.voidsetBeanClassLoader(ClassLoader classLoader) voidsetTypeExpression(Expression expression) Set the expression to evaluate against the message to determine the type.voidsetTypeExpressionString(String expression) Set the expression to evaluate against the message to determine the type id.typeExpression(String expression) Set the expression to evaluate against the message to determine the type id.typeExpression(Expression expression) Set the expression to evaluate against the message to determine the type.Methods inherited from class org.springframework.integration.transformer.AbstractTransformertransformMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
- 
Constructor Details- 
SimpleFromAvroTransformerpublic SimpleFromAvroTransformer(Class<? extends org.apache.avro.specific.SpecificRecord> defaultType) Construct an instance with the supplied default type to create.- Parameters:
- defaultType- the type.
 
 
- 
- 
Method Details- 
setBeanClassLoader- Specified by:
- setBeanClassLoaderin interface- BeanClassLoaderAware
 
- 
typeExpressionSet the expression to evaluate against the message to determine the type. Defaultheaders['avro_type'].- Parameters:
- expression- the expression.
- Returns:
- the transformer
 
- 
typeExpressionSet the expression to evaluate against the message to determine the type id. Defaultheaders['avro_type'].- Parameters:
- expression- the expression.
- Returns:
- the transformer
 
- 
setTypeExpressionSet the expression to evaluate against the message to determine the type. Defaultheaders['avro_type'].- Parameters:
- expression- the expression.
 
- 
setTypeExpressionStringSet the expression to evaluate against the message to determine the type id. Defaultheaders['avro_type'].- Parameters:
- expression- the expression.
 
- 
onInitprotected void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
- onInitin class- IntegrationObjectSupport
 
- 
doTransformDescription copied from class:AbstractTransformerSubclasses must implement this method to provide the transformation logic. If the return value is itself a Message, it will be used as the result. Otherwise, any non-null return value will be used as the payload of the result Message.- Specified by:
- doTransformin class- AbstractTransformer
- Parameters:
- message- The message.
- Returns:
- The result of the transformation.
 
 
-