Class DefaultJackson2JavaTypeMapper
java.lang.Object
org.springframework.amqp.support.converter.AbstractJavaTypeMapper
org.springframework.amqp.support.converter.DefaultJackson2JavaTypeMapper
- All Implemented Interfaces:
ClassMapper,Jackson2JavaTypeMapper,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware
@Deprecated(forRemoval=true,
since="4.0")
public class DefaultJackson2JavaTypeMapper
extends AbstractJavaTypeMapper
implements Jackson2JavaTypeMapper
Deprecated, for removal: This API element is subject to removal in a future version.
Jackson 2 type mapper.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.amqp.support.converter.Jackson2JavaTypeMapper
Jackson2JavaTypeMapper.TypePrecedence -
Field Summary
Fields inherited from class org.springframework.amqp.support.converter.AbstractJavaTypeMapper
DEFAULT_CLASSID_FIELD_NAME, DEFAULT_CONTENT_CLASSID_FIELD_NAME, DEFAULT_KEY_CLASSID_FIELD_NAME -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTrustedPackages(String @Nullable ... packages) Deprecated, for removal: This API element is subject to removal in a future version.Add trusted packages.voidfromClass(Class<?> clazz, MessageProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.voidfromJavaType(com.fasterxml.jackson.databind.JavaType javaType, MessageProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.Set the message properties according to the type.@Nullable com.fasterxml.jackson.databind.JavaTypegetInferredType(MessageProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.Return the inferred type, if the type precedence is inferred and the header is present.Deprecated, for removal: This API element is subject to removal in a future version.Return the precedence.voidsetTrustedPackages(String @Nullable ... trustedPackages) Deprecated, for removal: This API element is subject to removal in a future version.Specify a set of packages to trust during deserialization.voidsetTypePrecedence(Jackson2JavaTypeMapper.TypePrecedence typePrecedence) Deprecated, for removal: This API element is subject to removal in a future version.Set the precedence for evaluating type information in message properties.Class<?> toClass(MessageProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.com.fasterxml.jackson.databind.JavaTypetoJavaType(MessageProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.Determine the type from the message properties.Methods inherited from class org.springframework.amqp.support.converter.AbstractJavaTypeMapper
addHeader, fromInferredTypeHeader, getClassIdFieldName, getClassLoader, getContentClassIdFieldName, getIdClassMapping, getKeyClassIdFieldName, hasInferredTypeHeader, retrieveHeader, retrieveHeaderAsString, setBeanClassLoader, setIdClassMapping
-
Constructor Details
-
DefaultJackson2JavaTypeMapper
public DefaultJackson2JavaTypeMapper()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getTypePrecedence
Deprecated, for removal: This API element is subject to removal in a future version.Return the precedence.- Specified by:
getTypePrecedencein interfaceJackson2JavaTypeMapper- Returns:
- the precedence.
- Since:
- 1.6.
- See Also:
-
setTypePrecedence
Deprecated, for removal: This API element is subject to removal in a future version.Set the precedence for evaluating type information in message properties. When using@RabbitListenerat the method level, the framework attempts to determine the target type for payload conversion from the method signature. If so, this type is provided in theinferredArgumentTypemessage property.By default, if the type is concrete (not abstract, not an interface), this will be used ahead of type information provided in the
__TypeId__and associated headers provided by the sender.If you wish to force the use of the
__TypeId__and associated headers (such as when the actual type is a subclass of the method argument type), set the precedence toJackson2JavaTypeMapper.TypePrecedence.TYPE_ID.- Parameters:
typePrecedence- the precedence.- Since:
- 1.6
-
setTrustedPackages
Deprecated, for removal: This API element is subject to removal in a future version.Specify a set of packages to trust during deserialization. The asterisk (*) means trust all.- Parameters:
trustedPackages- the trusted Java packages for deserialization- Since:
- 1.6.11
-
addTrustedPackages
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Jackson2JavaTypeMapperAdd trusted packages.- Specified by:
addTrustedPackagesin interfaceJackson2JavaTypeMapper- Parameters:
packages- the packages.
-
toJavaType
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Jackson2JavaTypeMapperDetermine the type from the message properties.- Specified by:
toJavaTypein interfaceJackson2JavaTypeMapper- Parameters:
properties- the properties.- Returns:
- the type.
-
getInferredType
public @Nullable com.fasterxml.jackson.databind.JavaType getInferredType(MessageProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Jackson2JavaTypeMapperReturn the inferred type, if the type precedence is inferred and the header is present.- Specified by:
getInferredTypein interfaceJackson2JavaTypeMapper- Parameters:
properties- the message properties.- Returns:
- the type.
-
fromJavaType
public void fromJavaType(com.fasterxml.jackson.databind.JavaType javaType, MessageProperties properties) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Jackson2JavaTypeMapperSet the message properties according to the type.- Specified by:
fromJavaTypein interfaceJackson2JavaTypeMapper- Parameters:
javaType- the type.properties- the properties.
-
fromClass
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
fromClassin interfaceClassMapper
-
toClass
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
toClassin interfaceClassMapper
-
DefaultJacksonJavaTypeMapperfor Jackson 3.