Class JacksonObjectMapperProvider
- java.lang.Object
-
- akka.serialization.jackson.JacksonObjectMapperProvider
-
-
Constructor Summary
Constructors Constructor Description JacksonObjectMapperProvider(ExtendedActorSystem system)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static T
apply(ActorSystem system)
static T
apply(ClassicActorSystemProvider system)
static com.typesafe.config.Config
configForBinding(java.lang.String bindingName, com.typesafe.config.Config systemConfig)
The configuration for a givenbindingName
.com.fasterxml.jackson.databind.ObjectMapper
create(java.lang.String bindingName, java.util.Optional<com.fasterxml.jackson.core.JsonFactory> jsonFactory)
Java API: Creates a new instance of a JacksonObjectMapper
with sensible defaults and modules configured inakka.serialization.jackson.jackson-modules
.com.fasterxml.jackson.databind.ObjectMapper
create(java.lang.String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory)
Scala API: Creates a new instance of a JacksonObjectMapper
with sensible defaults and modules configured inakka.serialization.jackson.jackson-modules
.static JacksonObjectMapperProvider
createExtension(ExtendedActorSystem system)
static com.fasterxml.jackson.databind.ObjectMapper
createObjectMapper(java.lang.String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory, JacksonObjectMapperFactory objectMapperFactory, com.typesafe.config.Config config, DynamicAccess dynamicAccess, scala.Option<LoggingAdapter> log)
static boolean
equals(java.lang.Object other)
static JacksonObjectMapperProvider
get(ActorSystem system)
static JacksonObjectMapperProvider
get(ClassicActorSystemProvider system)
com.fasterxml.jackson.databind.ObjectMapper
getOrCreate(java.lang.String bindingName, java.util.Optional<com.fasterxml.jackson.core.JsonFactory> jsonFactory)
Java API: Returns an existing JacksonObjectMapper
that was created previously with this method, or creates a new instance.com.fasterxml.jackson.databind.ObjectMapper
getOrCreate(java.lang.String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory)
Scala API: Returns an existing JacksonObjectMapper
that was created previously with this method, or creates a new instance.static int
hashCode()
static JacksonObjectMapperProvider$
lookup()
-
-
-
Constructor Detail
-
JacksonObjectMapperProvider
public JacksonObjectMapperProvider(ExtendedActorSystem system)
-
-
Method Detail
-
get
public static JacksonObjectMapperProvider get(ActorSystem system)
-
get
public static JacksonObjectMapperProvider get(ClassicActorSystemProvider system)
-
lookup
public static JacksonObjectMapperProvider$ lookup()
-
createExtension
public static JacksonObjectMapperProvider createExtension(ExtendedActorSystem system)
-
configForBinding
public static com.typesafe.config.Config configForBinding(java.lang.String bindingName, com.typesafe.config.Config systemConfig)
The configuration for a givenbindingName
.
-
createObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper(java.lang.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
public static T apply(ActorSystem system)
-
apply
public static T apply(ClassicActorSystemProvider system)
-
hashCode
public static final int hashCode()
-
equals
public static final boolean equals(java.lang.Object other)
-
getOrCreate
public com.fasterxml.jackson.databind.ObjectMapper getOrCreate(java.lang.String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory)
Scala API: Returns an existing JacksonObjectMapper
that was created previously with this method, or creates a new instance.The
ObjectMapper
is created with sensible defaults and modules configured inakka.serialization.jackson.jackson-modules
. It's usingJacksonObjectMapperProviderSetup
if theActorSystem
is started with suchActorSystemSetup
.The returned
ObjectMapper
must not be modified, because it may already be in use and such modifications are not thread-safe.- Parameters:
bindingName
- name of thisObjectMapper
jsonFactory
- optionalJsonFactory
such asCBORFactory
, for plain JSONNone
(defaults) can be used
-
getOrCreate
public com.fasterxml.jackson.databind.ObjectMapper getOrCreate(java.lang.String bindingName, java.util.Optional<com.fasterxml.jackson.core.JsonFactory> jsonFactory)
Java API: Returns an existing JacksonObjectMapper
that was created previously with this method, or creates a new instance.The
ObjectMapper
is created with sensible defaults and modules configured inakka.serialization.jackson.jackson-modules
. It's usingJacksonObjectMapperProviderSetup
if theActorSystem
is started with suchActorSystemSetup
.The returned
ObjectMapper
must not be modified, because it may already be in use and such modifications are not thread-safe.- Parameters:
bindingName
- name of thisObjectMapper
jsonFactory
- optionalJsonFactory
such asCBORFactory
, for plain JSONNone
(defaults) can be used
-
create
public com.fasterxml.jackson.databind.ObjectMapper create(java.lang.String bindingName, scala.Option<com.fasterxml.jackson.core.JsonFactory> jsonFactory)
Scala API: Creates a new instance of a JacksonObjectMapper
with sensible defaults and modules configured inakka.serialization.jackson.jackson-modules
. It's usingJacksonObjectMapperProviderSetup
if theActorSystem
is started with suchActorSystemSetup
.- Parameters:
bindingName
- name of thisObjectMapper
jsonFactory
- optionalJsonFactory
such asCBORFactory
, for plain JSONNone
(defaults) can be used- See Also:
getOrCreate(java.lang.String, scala.Option<com.fasterxml.jackson.core.JsonFactory>)
-
create
public com.fasterxml.jackson.databind.ObjectMapper create(java.lang.String bindingName, java.util.Optional<com.fasterxml.jackson.core.JsonFactory> jsonFactory)
Java API: Creates a new instance of a JacksonObjectMapper
with sensible defaults and modules configured inakka.serialization.jackson.jackson-modules
. It's usingJacksonObjectMapperProviderSetup
if theActorSystem
is started with suchActorSystemSetup
.- Parameters:
bindingName
- name of thisObjectMapper
jsonFactory
- optionalJsonFactory
such asCBORFactory
, for plain JSONNone
(defaults) can be used- See Also:
getOrCreate(java.lang.String, scala.Option<com.fasterxml.jackson.core.JsonFactory>)
-
-