public abstract class AbstractAzureMessageConverter<T> extends Object implements AzureMessageConverter<T>
Message| Constructor and Description |
|---|
AbstractAzureMessageConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
buildCustomHeaders(T azureMessage) |
protected abstract T |
fromByte(byte[] payload) |
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. |
protected abstract T |
fromString(String payload) |
protected abstract byte[] |
getPayload(T azureMessage) |
protected void |
setCustomHeaders(org.springframework.messaging.MessageHeaders headers,
T azureMessage) |
<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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoMessagepublic T fromMessage(@NonNull org.springframework.messaging.Message<?> message, @NonNull Class<T> targetClass)
AzureMessageConverterMessage from a serialized form to a typed Object
of the specified target class.fromMessage in interface AzureMessageConverter<T>message - the input messagetargetClass - the target class for the conversionnull if the converter cannot
perform the conversionpublic <U> org.springframework.messaging.Message<U> toMessage(@NonNull
T azureMessage,
Map<String,Object> headers,
@NonNull
Class<U> targetPayloadClass)
AzureMessageConverterMessage 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.toMessage in interface AzureMessageConverter<T>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 typeprotected abstract byte[] getPayload(T azureMessage)
protected abstract T fromByte(byte[] payload)
protected void setCustomHeaders(org.springframework.messaging.MessageHeaders headers,
T azureMessage)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.