Package de.otto.synapse.translator
Class ObjectMappers
java.lang.Object
de.otto.synapse.translator.ObjectMappers
Manages the ObjectMapper used by Synapse applications for serialization and deserialization purposes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapperReturns theObjectMappercurrently used by Synapse.static com.fasterxml.jackson.databind.ObjectMapperstatic voidoverrideObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Overrides the object mapper actually used by Synapse.
-
Method Details
-
defaultObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper defaultObjectMapper()- Returns:
- the default objectmapper configured as expected by Synapse.
-
currentObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper currentObjectMapper()Returns theObjectMappercurrently used by Synapse.By default, this is the same as
defaultObjectMapper(). You can override this mapper usingoverrideObjectMapper(ObjectMapper).- Returns:
- the
ObjectMappercurrently used by Synapse.
-
overrideObjectMapper
public static void overrideObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Overrides the object mapper actually used by Synapse.Handle with care as there is a chance to break message passing across Synapse services if configured in an unexpected way.
- Parameters:
objectMapper- the ObjectMapper used to serialize and deserialize messages
-