Class JacksonObjectMapperFactory
- java.lang.Object
-
- org.apache.pekko.serialization.jackson.JacksonObjectMapperFactory
-
public class JacksonObjectMapperFactory extends java.lang.Object
Used withJacksonObjectMapperProviderSetup
for defining aJacksonObjectMapperProvider
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 JacksonObjectMapperFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.ObjectMapper
newObjectMapper(java.lang.String bindingName, com.fasterxml.jackson.core.JsonFactory jsonFactory)
Override this method to create a new custom instance ofObjectMapper
for the givenserializerIdentifier
.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.DeserializationFeature,java.lang.Object>>
overrideConfiguredDeserializationFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.DeserializationFeature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
the configured deserialization features are applied to the mapper.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.JsonGenerator.Feature,java.lang.Object>>
overrideConfiguredJsonGeneratorFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.JsonGenerator.Feature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
the configured JSON generator features are applied to the mapper.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.JsonParser.Feature,java.lang.Object>>
overrideConfiguredJsonParserFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.JsonParser.Feature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
the configured JSON parser features are applied to the mapper.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.json.JsonReadFeature,java.lang.Object>>
overrideConfiguredJsonReadFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.json.JsonReadFeature,java.lang.Object>> configuredFeatures)
JsonReadFeature
s used to configure theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.json.JsonWriteFeature,java.lang.Object>>
overrideConfiguredJsonWriteFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.json.JsonWriteFeature,java.lang.Object>> configuredFeatures)
JsonWriteFeature
s used to configure theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.MapperFeature,java.lang.Object>>
overrideConfiguredMapperFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.MapperFeature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
the configured mapper features are applied to the mapper.scala.collection.immutable.Seq<com.fasterxml.jackson.databind.Module>
overrideConfiguredModules(java.lang.String bindingName, scala.collection.immutable.Seq<com.fasterxml.jackson.databind.Module> configuredModules)
After construction of theObjectMapper
the configured modules are added to the mapper.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.SerializationFeature,java.lang.Object>>
overrideConfiguredSerializationFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.SerializationFeature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
the configured serialization features are applied to the mapper.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.StreamReadFeature,java.lang.Object>>
overrideConfiguredStreamReadFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.StreamReadFeature,java.lang.Object>> configuredFeatures)
StreamReadFeature
s used to configure theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.StreamWriteFeature,java.lang.Object>>
overrideConfiguredStreamWriteFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.StreamWriteFeature,java.lang.Object>> configuredFeatures)
StreamWriteFeature
s used to configure theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
.scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.annotation.PropertyAccessor,com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility>>
overrideConfiguredVisibility(java.lang.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 theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
.
-
-
-
Method Detail
-
newObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper newObjectMapper(java.lang.String bindingName, com.fasterxml.jackson.core.JsonFactory jsonFactory)
Override this method to create a new custom instance ofObjectMapper
for the givenserializerIdentifier
.- Parameters:
bindingName
- name of thisObjectMapper
jsonFactory
- optionalJsonFactory
such asCBORFactory
, for plain JSONNone
(defaults) can be used
-
overrideConfiguredDeserializationFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.DeserializationFeature,java.lang.Object>> overrideConfiguredDeserializationFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.DeserializationFeature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
the configured deserialization features are applied to the mapper. These features can be amended programatically by overriding this method and return the features that are to be applied to theObjectMapper
.When implementing a
JacksonObjectMapperFactory
with Java theimmutable.Seq
can be created withpekko.japi.Util.immutableSeq
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofDeserializationFeature
that were configured inpekko.serialization.jackson.deserialization-features
-
overrideConfiguredJsonGeneratorFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.JsonGenerator.Feature,java.lang.Object>> overrideConfiguredJsonGeneratorFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.JsonGenerator.Feature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
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 theObjectMapper
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofJsonGenerator.Feature
that were configured inpekko.serialization.jackson.json-generator-features
-
overrideConfiguredJsonParserFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.JsonParser.Feature,java.lang.Object>> overrideConfiguredJsonParserFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.JsonParser.Feature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
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 theObjectMapper
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofJsonParser.Feature
that were configured inpekko.serialization.jackson.json-parser-features
-
overrideConfiguredJsonReadFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.json.JsonReadFeature,java.lang.Object>> overrideConfiguredJsonReadFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.json.JsonReadFeature,java.lang.Object>> configuredFeatures)
JsonReadFeature
s used to configure theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
. These features can be amended programmatically by overriding this method and return the features that are to be applied to theJsonFactoryBuilder
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofJsonReadFeature
that were configured inpekko.serialization.jackson.json-read-features
-
overrideConfiguredJsonWriteFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.json.JsonWriteFeature,java.lang.Object>> overrideConfiguredJsonWriteFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.json.JsonWriteFeature,java.lang.Object>> configuredFeatures)
JsonWriteFeature
s used to configure theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
. These features can be amended programmatically by overriding this method and return the features that are to be applied to theJsonFactoryBuilder
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofJsonWriteFeature
that were configured inpekko.serialization.jackson.json-write-features
-
overrideConfiguredMapperFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.MapperFeature,java.lang.Object>> overrideConfiguredMapperFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.MapperFeature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
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 theObjectMapper
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofMapperFeatures
that were configured inpekko.serialization.jackson.mapper-features
-
overrideConfiguredModules
public scala.collection.immutable.Seq<com.fasterxml.jackson.databind.Module> overrideConfiguredModules(java.lang.String bindingName, scala.collection.immutable.Seq<com.fasterxml.jackson.databind.Module> configuredModules)
After construction of theObjectMapper
the configured modules are added to the mapper. These modules can be amended programatically by overriding this method and return the modules that are to be applied to theObjectMapper
.When implementing a
JacksonObjectMapperFactory
with Java theimmutable.Seq
can be created withpekko.japi.Util.immutableSeq
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredModules
- the list ofModules
that were configured inpekko.serialization.jackson.deserialization-features
-
overrideConfiguredSerializationFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.SerializationFeature,java.lang.Object>> overrideConfiguredSerializationFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.databind.SerializationFeature,java.lang.Object>> configuredFeatures)
After construction of theObjectMapper
the configured serialization features are applied to the mapper. These features can be amended programatically by overriding this method and return the features that are to be applied to theObjectMapper
.When implementing a
JacksonObjectMapperFactory
with Java theimmutable.Seq
can be created withpekko.japi.Util.immutableSeq
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofSerializationFeature
that were configured inpekko.serialization.jackson.serialization-features
-
overrideConfiguredStreamReadFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.StreamReadFeature,java.lang.Object>> overrideConfiguredStreamReadFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.StreamReadFeature,java.lang.Object>> configuredFeatures)
StreamReadFeature
s used to configure theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
. These features can be amended programmatically by overriding this method and return the features that are to be applied to theJsonFactoryBuilder
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofStreamReadFeature
that were configured inpekko.serialization.jackson.stream-read-features
-
overrideConfiguredStreamWriteFeatures
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.StreamWriteFeature,java.lang.Object>> overrideConfiguredStreamWriteFeatures(java.lang.String bindingName, scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.core.StreamWriteFeature,java.lang.Object>> configuredFeatures)
StreamWriteFeature
s used to configure theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
. These features can be amended programmatically by overriding this method and return the features that are to be applied to theJsonFactoryBuilder
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofStreamWriterFeature
that were configured inpekko.serialization.jackson.stream-write-features
-
overrideConfiguredVisibility
public scala.collection.immutable.Seq<scala.Tuple2<com.fasterxml.jackson.annotation.PropertyAccessor,com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility>> overrideConfiguredVisibility(java.lang.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 theJsonFactoryBuilder
that, if provided, will later be used to create anObjectMapper
. These settings can be amended programmatically by overriding this method and return the values that are to be applied to theJsonFactoryBuilder
.- Parameters:
bindingName
- bindingName name of thisObjectMapper
configuredFeatures
- the list ofPropertyAccessor
/JsonAutoDetect.Visibility
that were configured inpekko.serialization.jackson.visibility
-
-