Class ObjectStringMessageConverter
java.lang.Object
org.springframework.messaging.converter.AbstractMessageConverter
org.springframework.messaging.converter.StringMessageConverter
org.springframework.integration.support.converter.ObjectStringMessageConverter
- All Implemented Interfaces:
MessageConverter
,SmartMessageConverter
A
StringMessageConverter
extension to convert any object to string.
Delegates to super when payload is byte[]
or String
.
Performs Object.toString()
in other cases.
This class is intended to serve as a fallback converter for internal message deserialization purposes. Therefore, it
is recommended to exclusively use the
fromMessage
method with String.class
as the targetClass
.
- Since:
- 5.0
- Author:
- Marius Bogoevici, Artem Bilan, Falk Hanisch
-
Field Summary
Fields inherited from class org.springframework.messaging.converter.AbstractMessageConverter
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
convertFromInternal
(Message<?> message, Class<?> targetClass, Object conversionHint) Methods inherited from class org.springframework.messaging.converter.StringMessageConverter
convertToInternal, supports
Methods inherited from class org.springframework.messaging.converter.AbstractMessageConverter
addSupportedMimeTypes, canConvertFrom, canConvertTo, fromMessage, fromMessage, getContentTypeResolver, getDefaultContentType, getMimeType, getSerializedPayloadClass, getSupportedMimeTypes, isStrictContentTypeMatch, setContentTypeResolver, setSerializedPayloadClass, setStrictContentTypeMatch, supportsMimeType, toMessage, toMessage
-
Constructor Details
-
ObjectStringMessageConverter
-
ObjectStringMessageConverter
public ObjectStringMessageConverter()
-
-
Method Details
-
convertFromInternal
protected Object convertFromInternal(Message<?> message, Class<?> targetClass, @Nullable Object conversionHint) - Overrides:
convertFromInternal
in classStringMessageConverter
-