Class PayloadDeserializingTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.AbstractPayloadTransformer<T,U>
org.springframework.integration.transformer.PayloadTypeConvertingTransformer<byte[],java.lang.Object>
org.springframework.integration.transformer.PayloadDeserializingTransformer
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,ExpressionCapable,NamedComponent,GenericTransformer<org.springframework.messaging.Message<?>,org.springframework.messaging.Message<?>>,Transformer
public class PayloadDeserializingTransformer extends PayloadTypeConvertingTransformer<byte[],java.lang.Object>
Transformer that deserializes the inbound byte array payload to an object by delegating
to a Converter<byte[], Object>. Default delegate is a
AllowListDeserializingConverter using Java serialization.
The byte array payload must be a result of equivalent serialization.
- Since:
- 1.0.1
-
Field Summary
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger -
Constructor Summary
Constructors Constructor Description PayloadDeserializingTransformer()Instantiate based on theAllowListDeserializingConverterwith theDefaultDeserializer. -
Method Summary
Modifier and Type Method Description voidsetAllowedPatterns(java.lang.String... patterns)When using aAllowListDeserializingConverter(the default) add patterns for packages/classes that are allowed to be deserialized.voidsetDeserializer(org.springframework.core.serializer.Deserializer<java.lang.Object> deserializer)Methods inherited from class org.springframework.integration.transformer.PayloadTypeConvertingTransformer
doSetConverter, getConverter, onInit, setConverter, transformPayloadMethods inherited from class org.springframework.integration.transformer.AbstractPayloadTransformer
doTransformMethods inherited from class org.springframework.integration.transformer.AbstractTransformer
transformMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
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
-
Constructor Details
-
PayloadDeserializingTransformer
public PayloadDeserializingTransformer()Instantiate based on theAllowListDeserializingConverterwith theDefaultDeserializer.
-
-
Method Details
-
setDeserializer
public void setDeserializer(org.springframework.core.serializer.Deserializer<java.lang.Object> deserializer) -
setAllowedPatterns
public void setAllowedPatterns(java.lang.String... patterns)When using aAllowListDeserializingConverter(the default) add patterns for packages/classes that are allowed to be deserialized. A class can be fully qualified or a wildcard '*' is allowed at the beginning or end of the class name. Examples:com.foo.*,*.MyClass.- Parameters:
patterns- the patterns.- Since:
- 5.4
-