T - Azure message typepublic interface AzureMessageConverter<T>
Message from serialized form to a typed
Object and vice versa.| Modifier and Type | Method and Description |
|---|---|
T |
fromMessage(org.springframework.messaging.Message<?> message,
Class<T> targetClass)
Convert the payload of a
Message from a serialized form to a typed Object
of the specified target class. |
default <U> org.springframework.messaging.Message<U> |
toMessage(T azureMessage,
Class<U> targetPayloadClass) |
<U> org.springframework.messaging.Message<U> |
toMessage(T azureMessage,
Map<String,Object> headers,
Class<U> targetPayloadClass)
Create a
Message whose payload is the result of converting the given
payload Object to serialized form. |
@Nullable T fromMessage(org.springframework.messaging.Message<?> message, Class<T> targetClass)
Message from a serialized form to a typed Object
of the specified target class.message - the input messagetargetClass - the target class for the conversionnull if the converter cannot
perform the conversion@Nullable <U> org.springframework.messaging.Message<U> toMessage(T azureMessage, Map<String,Object> headers, Class<U> targetPayloadClass)
Message whose payload is the result of converting the given
payload Object to serialized form. The optional MessageHeaders parameter
may contain additional headers to be added to the message.azureMessage - the Object to convertheaders - optional headers for the messagetargetPayloadClass - the target payload class for the conversionnull if the converter does not support the
Object type or the target media typeCopyright © 2019 Pivotal Software, Inc.. All rights reserved.