Interface Jackson2JavaTypeMapper
- All Superinterfaces:
ClassMapper
- All Known Implementing Classes:
DefaultJackson2JavaTypeMapper
Strategy for setting metadata on messages such that one can create the class that needs
to be instantiated when receiving a message.
- Author:
- Mark Pollack, James Carr, Sam Nelson, Andreas Asplund, Gary Russell
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe precedence for type conversion - inferred from the method parameter or message headers. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddTrustedPackages(String... packages) Add trusted packages.voidfromJavaType(com.fasterxml.jackson.databind.JavaType javaType, MessageProperties properties) Set the message properties according to the type.com.fasterxml.jackson.databind.JavaTypegetInferredType(MessageProperties properties) Return the inferred type, if the type precedence is inferred and the header is present.Get the type precedence.com.fasterxml.jackson.databind.JavaTypetoJavaType(MessageProperties properties) Determine the type from the message properties.Methods inherited from interface org.springframework.amqp.support.converter.ClassMapper
fromClass, toClass
-
Method Details
-
fromJavaType
Set the message properties according to the type.- Parameters:
javaType- the type.properties- the properties.
-
toJavaType
Determine the type from the message properties.- Parameters:
properties- the properties.- Returns:
- the type.
-
getTypePrecedence
Jackson2JavaTypeMapper.TypePrecedence getTypePrecedence()Get the type precedence.- Returns:
- the precedence.
- Since:
- 1.6
-
addTrustedPackages
Add trusted packages.- Parameters:
packages- the packages.- Since:
- 2.1
-
getInferredType
Return the inferred type, if the type precedence is inferred and the header is present.- Parameters:
properties- the message properties.- Returns:
- the type.
- Since:
- 2.2
-