Class JacksonObjectMapperProvider
- All Implemented Interfaces:
Extension
ObjectMapper instances, each with its unique bindingName.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tapply(ActorSystem system) static Tapply(ClassicActorSystemProvider system) static com.typesafe.config.ConfigconfigForBinding(String bindingName, com.typesafe.config.Config systemConfig) The configuration for a givenbindingName.com.fasterxml.jackson.databind.ObjectMapperJava API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson.jackson-modules.com.fasterxml.jackson.databind.ObjectMapperScala API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson.jackson-modules.static JacksonObjectMapperProvidercreateExtension(ExtendedActorSystem system) static com.fasterxml.jackson.databind.ObjectMappercreateObjectMapper(String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory, JacksonObjectMapperFactory objectMapperFactory, com.typesafe.config.Config config, DynamicAccess dynamicAccess, scala.Option<LoggingAdapter> log) static final booleanstatic JacksonObjectMapperProviderget(ActorSystem system) static JacksonObjectMapperProviderget(ClassicActorSystemProvider system) com.fasterxml.jackson.databind.ObjectMappergetOrCreate(String bindingName, Optional<com.fasterxml.jackson.core.JsonFactory> jsonFactory) Java API: Returns an existing JacksonObjectMapperthat was created previously with this method, or creates a new instance.com.fasterxml.jackson.databind.ObjectMappergetOrCreate(String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory) Scala API: Returns an existing JacksonObjectMapperthat was created previously with this method, or creates a new instance.static final inthashCode()static JacksonObjectMapperProvider$lookup()
-
Constructor Details
-
JacksonObjectMapperProvider
-
-
Method Details
-
get
-
get
-
lookup
-
createExtension
-
configForBinding
public static com.typesafe.config.Config configForBinding(String bindingName, com.typesafe.config.Config systemConfig) The configuration for a givenbindingName. -
createObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper(String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory, JacksonObjectMapperFactory objectMapperFactory, com.typesafe.config.Config config, DynamicAccess dynamicAccess, scala.Option<LoggingAdapter> log) INTERNAL API: Usecreate(java.lang.String, scala.Option<com.fasterxml.jackson.core.JsonFactory>)This is needed by one test in Lagom where the ObjectMapper is created without starting and ActorSystem.
-
apply
-
apply
-
hashCode
public static final int hashCode() -
equals
-
getOrCreate
public com.fasterxml.jackson.databind.ObjectMapper getOrCreate(String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory) Scala API: Returns an existing JacksonObjectMapperthat was created previously with this method, or creates a new instance.The
ObjectMapperis created with sensible defaults and modules configured inpekko.serialization.jackson.jackson-modules. It's usingJacksonObjectMapperProviderSetupif theActorSystemis started with suchpekko.actor.setup.ActorSystemSetup.The returned
ObjectMappermust not be modified, because it may already be in use and such modifications are not thread-safe.- Parameters:
bindingName- name of thisObjectMapperjsonFactory- optionalJsonFactorysuch asCBORFactory, for plain JSONNone(defaults) can be used
-
getOrCreate
public com.fasterxml.jackson.databind.ObjectMapper getOrCreate(String bindingName, Optional<com.fasterxml.jackson.core.JsonFactory> jsonFactory) Java API: Returns an existing JacksonObjectMapperthat was created previously with this method, or creates a new instance.The
ObjectMapperis created with sensible defaults and modules configured inpekko.serialization.jackson.jackson-modules. It's usingJacksonObjectMapperProviderSetupif theActorSystemis started with suchpekko.actor.setup.ActorSystemSetup.The returned
ObjectMappermust not be modified, because it may already be in use and such modifications are not thread-safe.- Parameters:
bindingName- name of thisObjectMapperjsonFactory- optionalJsonFactorysuch asCBORFactory, for plain JSONNone(defaults) can be used
-
create
public com.fasterxml.jackson.databind.ObjectMapper create(String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory) Scala API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson.jackson-modules. It's usingJacksonObjectMapperProviderSetupif theActorSystemis started with suchpekko.actor.setup.ActorSystemSetup.- Parameters:
bindingName- name of thisObjectMapperjsonFactory- optionalJsonFactorysuch asCBORFactory, for plain JSONNone(defaults) can be used- See Also:
-
create
public com.fasterxml.jackson.databind.ObjectMapper create(String bindingName, Optional<com.fasterxml.jackson.core.JsonFactory> jsonFactory) Java API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson.jackson-modules. It's usingJacksonObjectMapperProviderSetupif theActorSystemis started with suchpekko.actor.setup.ActorSystemSetup.- Parameters:
bindingName- name of thisObjectMapperjsonFactory- optionalJsonFactorysuch asCBORFactory, for plain JSONNone(defaults) can be used- See Also:
-