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.tools.jackson.databind.ObjectMapperJava API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson3.jackson-modules.tools.jackson.databind.ObjectMapperScala API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson3.jackson-modules.tools.jackson.databind.ObjectMappercreateCBOR(String bindingName, scala.Option<tools.jackson.dataformat.cbor.CBORFactory> streamFactory) Scala API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson3.jackson-modules.static tools.jackson.databind.ObjectMappercreateCBORMapper(String bindingName, scala.Option<tools.jackson.dataformat.cbor.CBORFactory> streamFactory, JacksonObjectMapperFactory objectMapperFactory, com.typesafe.config.Config config, DynamicAccess dynamicAccess, scala.Option<LoggingAdapter> log) static JacksonObjectMapperProvidercreateExtension(ExtendedActorSystem system) static tools.jackson.databind.ObjectMappercreateObjectMapper(String bindingName, scala.Option<tools.jackson.core.json.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) tools.jackson.databind.ObjectMappergetOrCreate(String bindingName, Optional<tools.jackson.core.json.JsonFactory> jsonFactory) Java API: Returns an existing JacksonObjectMapperthat was created previously with this method, or creates a new instance.tools.jackson.databind.ObjectMappergetOrCreate(String bindingName, scala.Option<tools.jackson.core.json.JsonFactory> jsonFactory) Scala API: Returns an existing JacksonObjectMapperthat was created previously with this method, or creates a new instance.tools.jackson.databind.ObjectMappergetOrCreateCBOR(String bindingName, scala.Option<tools.jackson.dataformat.cbor.CBORFactory> 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 tools.jackson.databind.ObjectMapper createObjectMapper(String bindingName, scala.Option<tools.jackson.core.json.JsonFactory> jsonFactory, JacksonObjectMapperFactory objectMapperFactory, com.typesafe.config.Config config, DynamicAccess dynamicAccess, scala.Option<LoggingAdapter> log) INTERNAL API: Usecreate(java.lang.String, scala.Option<tools.jackson.core.json.JsonFactory>)This is needed by one test in Lagom where the ObjectMapper is created without starting and ActorSystem.
-
createCBORMapper
public static tools.jackson.databind.ObjectMapper createCBORMapper(String bindingName, scala.Option<tools.jackson.dataformat.cbor.CBORFactory> streamFactory, JacksonObjectMapperFactory objectMapperFactory, com.typesafe.config.Config config, DynamicAccess dynamicAccess, scala.Option<LoggingAdapter> log) -
apply
-
apply
-
hashCode
public static final int hashCode() -
equals
-
getOrCreate
public tools.jackson.databind.ObjectMapper getOrCreate(String bindingName, scala.Option<tools.jackson.core.json.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.jackson3.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- optionalJsonFactory, for plain JSONNone(defaults) can be used
-
getOrCreateCBOR
public tools.jackson.databind.ObjectMapper getOrCreateCBOR(String bindingName, scala.Option<tools.jackson.dataformat.cbor.CBORFactory> 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.jackson3.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- optionalCBORFactory
-
getOrCreate
public tools.jackson.databind.ObjectMapper getOrCreate(String bindingName, Optional<tools.jackson.core.json.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.jackson3.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 tools.jackson.databind.ObjectMapper create(String bindingName, scala.Option<tools.jackson.core.json.JsonFactory> jsonFactory) Scala API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson3.jackson-modules. It's usingJacksonObjectMapperProviderSetupif theActorSystemis started with suchpekko.actor.setup.ActorSystemSetup.- Parameters:
bindingName- name of thisObjectMapperjsonFactory- optionalJsonFactory, for plain JSONNone(defaults) can be used- See Also:
-
createCBOR
public tools.jackson.databind.ObjectMapper createCBOR(String bindingName, scala.Option<tools.jackson.dataformat.cbor.CBORFactory> streamFactory) Scala API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson3.jackson-modules. It's usingJacksonObjectMapperProviderSetupif theActorSystemis started with suchpekko.actor.setup.ActorSystemSetup.- Parameters:
bindingName- name of thisObjectMapperjsonFactory- optionalCBORFactory- See Also:
-
create
public tools.jackson.databind.ObjectMapper create(String bindingName, Optional<tools.jackson.core.json.JsonFactory> jsonFactory) Java API: Creates a new instance of a JacksonObjectMapperwith sensible defaults and modules configured inpekko.serialization.jackson3.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:
-