Class 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
  • Constructor Details

  • Method Details

    • setDeserializer

      public void setDeserializer(Deserializer<Object> deserializer)
    • setAllowedPatterns

      public void setAllowedPatterns(String... patterns)
      When using a AllowListDeserializingConverter (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