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[],Object>
org.springframework.integration.transformer.PayloadDeserializingTransformer
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,BeanNameAware
,InitializingBean
,ApplicationContextAware
,ExpressionCapable
,GenericTransformer<Message<?>,
,Message<?>> NamedComponent
,Transformer
public class PayloadDeserializingTransformer
extends PayloadTypeConvertingTransformer<byte[],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
- Author:
- Mark Fisher, Gary Russell, Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger
-
Constructor Summary
ConstructorDescriptionInstantiate based on theAllowListDeserializingConverter
with theDefaultDeserializer
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setAllowedPatterns
(String... patterns) When using aAllowListDeserializingConverter
(the default) add patterns for packages/classes that are allowed to be deserialized.void
setDeserializer
(Deserializer<Object> deserializer) Methods inherited from class org.springframework.integration.transformer.PayloadTypeConvertingTransformer
doSetConverter, getConverter, onInit, setConverter, transformPayload
Methods inherited from class org.springframework.integration.transformer.AbstractPayloadTransformer
doTransform
Methods inherited from class org.springframework.integration.transformer.AbstractTransformer
transform
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, 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
-
PayloadDeserializingTransformer
public PayloadDeserializingTransformer()Instantiate based on theAllowListDeserializingConverter
with theDefaultDeserializer
.
-
-
Method Details
-
setDeserializer
-
setAllowedPatterns
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
-