Class JacksonObjectMapperFactory

java.lang.Object
org.apache.pekko.serialization.jackson3.JacksonObjectMapperFactory

public class JacksonObjectMapperFactory extends Object
Used with JacksonObjectMapperProviderSetup for defining a JacksonObjectMapperProvider that can be passed in when ActorSystem is created rather than creating one from configured class name. Create a subclass and override the methods to amend the defaults.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    tools.jackson.dataformat.cbor.CBORMapper.Builder
    newCBORMapperBuilder(tools.jackson.dataformat.cbor.CBORFactory factory)
     
    tools.jackson.databind.json.JsonMapper.Builder
    newObjectMapperBuilder(tools.jackson.core.json.JsonFactory jsonFactory)
     
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.cfg.DateTimeFeature,Object>>
    overrideConfiguredDateTimeFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.cfg.DateTimeFeature,Object>> configuredFeatures)
    After construction of the ObjectMapper the configured datetime features are applied to the mapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.DeserializationFeature,Object>>
    overrideConfiguredDeserializationFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.DeserializationFeature,Object>> configuredFeatures)
    After construction of the ObjectMapper the configured deserialization features are applied to the mapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.cfg.EnumFeature,Object>>
    overrideConfiguredEnumFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.cfg.EnumFeature,Object>> configuredFeatures)
    After construction of the ObjectMapper the configured enum features are applied to the mapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamWriteFeature,Object>>
    overrideConfiguredJsonGeneratorFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamWriteFeature,Object>> configuredFeatures)
    After construction of the ObjectMapper the configured JSON generator features are applied to the mapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamReadFeature,Object>>
    overrideConfiguredJsonParserFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamReadFeature,Object>> configuredFeatures)
    After construction of the ObjectMapper the configured JSON parser features are applied to the mapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.json.JsonReadFeature,Object>>
    overrideConfiguredJsonReadFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.json.JsonReadFeature,Object>> configuredFeatures)
    JsonReadFeatures used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.json.JsonWriteFeature,Object>>
    overrideConfiguredJsonWriteFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.json.JsonWriteFeature,Object>> configuredFeatures)
    JsonWriteFeatures used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.MapperFeature,Object>>
    overrideConfiguredMapperFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.MapperFeature,Object>> configuredFeatures)
    After construction of the ObjectMapper the configured mapper features are applied to the mapper.
    scala.collection.immutable.Seq<tools.jackson.databind.JacksonModule>
    overrideConfiguredModules(String bindingName, scala.collection.immutable.Seq<tools.jackson.databind.JacksonModule> configuredModules)
    After construction of the ObjectMapper the configured modules are added to the mapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.SerializationFeature,Object>>
    overrideConfiguredSerializationFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.SerializationFeature,Object>> configuredFeatures)
    After construction of the ObjectMapper the configured serialization features are applied to the mapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamReadFeature,Object>>
    overrideConfiguredStreamReadFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamReadFeature,Object>> configuredFeatures)
    StreamReadFeatures used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper.
    scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamWriteFeature,Object>>
    overrideConfiguredStreamWriteFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamWriteFeature,Object>> configuredFeatures)
    StreamWriteFeatures used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper.
    scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.annotation.PropertyAccessor,com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility>>
    overrideConfiguredVisibility(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.annotation.PropertyAccessor,com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility>> configuredFeatures)
    Visibility settings used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JacksonObjectMapperFactory

      public JacksonObjectMapperFactory()
  • Method Details

    • newCBORMapperBuilder

      public tools.jackson.dataformat.cbor.CBORMapper.Builder newCBORMapperBuilder(tools.jackson.dataformat.cbor.CBORFactory factory)
    • newObjectMapperBuilder

      public tools.jackson.databind.json.JsonMapper.Builder newObjectMapperBuilder(tools.jackson.core.json.JsonFactory jsonFactory)
    • overrideConfiguredDateTimeFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.cfg.DateTimeFeature,Object>> overrideConfiguredDateTimeFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.cfg.DateTimeFeature,Object>> configuredFeatures)
      After construction of the ObjectMapper the configured datetime features are applied to the mapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the ObjectMapper.

      When implementing a JacksonObjectMapperFactory with Java the immutable.Seq can be created with pekko.japi.Util.immutableSeq.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of DateTimeFeature that were configured in pekko.serialization.jackson3.datetime-features
    • overrideConfiguredDeserializationFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.DeserializationFeature,Object>> overrideConfiguredDeserializationFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.DeserializationFeature,Object>> configuredFeatures)
      After construction of the ObjectMapper the configured deserialization features are applied to the mapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the ObjectMapper.

      When implementing a JacksonObjectMapperFactory with Java the immutable.Seq can be created with pekko.japi.Util.immutableSeq.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of DeserializationFeature that were configured in pekko.serialization.jackson3.deserialization-features
    • overrideConfiguredEnumFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.cfg.EnumFeature,Object>> overrideConfiguredEnumFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.cfg.EnumFeature,Object>> configuredFeatures)
      After construction of the ObjectMapper the configured enum features are applied to the mapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the ObjectMapper.

      When implementing a JacksonObjectMapperFactory with Java the immutable.Seq can be created with pekko.japi.Util.immutableSeq.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of DateTimeFeature that were configured in pekko.serialization.jackson3.enum-features
    • overrideConfiguredJsonGeneratorFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamWriteFeature,Object>> overrideConfiguredJsonGeneratorFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamWriteFeature,Object>> configuredFeatures)
      After construction of the ObjectMapper the configured JSON generator features are applied to the mapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the ObjectMapper.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of StreamWriteFeature that were configured in pekko.serialization.jackson3.json-generator-features
    • overrideConfiguredJsonParserFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamReadFeature,Object>> overrideConfiguredJsonParserFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamReadFeature,Object>> configuredFeatures)
      After construction of the ObjectMapper the configured JSON parser features are applied to the mapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the ObjectMapper.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of StreamReadFeature that were configured in pekko.serialization.jackson3.stream-read-features
    • overrideConfiguredJsonReadFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.json.JsonReadFeature,Object>> overrideConfiguredJsonReadFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.json.JsonReadFeature,Object>> configuredFeatures)
      JsonReadFeatures used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the JsonFactoryBuilder.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of JsonReadFeature that were configured in pekko.serialization.jackson3.json-read-features
    • overrideConfiguredJsonWriteFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.json.JsonWriteFeature,Object>> overrideConfiguredJsonWriteFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.json.JsonWriteFeature,Object>> configuredFeatures)
      JsonWriteFeatures used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the JsonFactoryBuilder.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of JsonWriteFeature that were configured in pekko.serialization.jackson3.json-write-features
    • overrideConfiguredMapperFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.MapperFeature,Object>> overrideConfiguredMapperFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.MapperFeature,Object>> configuredFeatures)
      After construction of the ObjectMapper the configured mapper features are applied to the mapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the ObjectMapper.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of MapperFeatures that were configured in pekko.serialization.jackson3.mapper-features
    • overrideConfiguredModules

      public scala.collection.immutable.Seq<tools.jackson.databind.JacksonModule> overrideConfiguredModules(String bindingName, scala.collection.immutable.Seq<tools.jackson.databind.JacksonModule> configuredModules)
      After construction of the ObjectMapper the configured modules are added to the mapper. These modules can be amended programmatically by overriding this method and return the modules that are to be applied to the ObjectMapper.

      When implementing a JacksonObjectMapperFactory with Java the immutable.Seq can be created with pekko.japi.Util.immutableSeq.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredModules - the list of Modules that were configured in pekko.serialization.jackson3.deserialization-features
    • overrideConfiguredSerializationFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.SerializationFeature,Object>> overrideConfiguredSerializationFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.databind.SerializationFeature,Object>> configuredFeatures)
      After construction of the ObjectMapper the configured serialization features are applied to the mapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the ObjectMapper.

      When implementing a JacksonObjectMapperFactory with Java the immutable.Seq can be created with pekko.japi.Util.immutableSeq.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of SerializationFeature that were configured in pekko.serialization.jackson3.serialization-features
    • overrideConfiguredStreamReadFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamReadFeature,Object>> overrideConfiguredStreamReadFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamReadFeature,Object>> configuredFeatures)
      StreamReadFeatures used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the JsonFactoryBuilder.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of StreamReadFeature that were configured in pekko.serialization.jackson3.stream-read-features
    • overrideConfiguredStreamWriteFeatures

      public scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamWriteFeature,Object>> overrideConfiguredStreamWriteFeatures(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<tools.jackson.core.StreamWriteFeature,Object>> configuredFeatures)
      StreamWriteFeatures used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper. These features can be amended programmatically by overriding this method and return the features that are to be applied to the JsonFactoryBuilder.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of StreamWriterFeature that were configured in pekko.serialization.jackson3.stream-write-features
    • overrideConfiguredVisibility

      public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.annotation.PropertyAccessor,com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility>> overrideConfiguredVisibility(String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.annotation.PropertyAccessor,com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility>> configuredFeatures)
      Visibility settings used to configure the JsonFactoryBuilder that, if provided, will later be used to create an ObjectMapper. These settings can be amended programmatically by overriding this method and return the values that are to be applied to the JsonFactoryBuilder.

      Parameters:
      bindingName - bindingName name of this ObjectMapper
      configuredFeatures - the list of PropertyAccessor/JsonAutoDetect.Visibility that were configured in pekko.serialization.jackson3.visibility