Class EventHubsMessageConverter
java.lang.Object
com.azure.spring.messaging.converter.AbstractAzureMessageConverter<com.azure.messaging.eventhubs.EventData,com.azure.messaging.eventhubs.EventData>
com.azure.spring.messaging.eventhubs.support.converter.EventHubsMessageConverter
- All Implemented Interfaces:
AzureMessageConverter<com.azure.messaging.eventhubs.EventData,
com.azure.messaging.eventhubs.EventData>
public class EventHubsMessageConverter
extends AbstractAzureMessageConverter<com.azure.messaging.eventhubs.EventData,com.azure.messaging.eventhubs.EventData>
A converter to turn a
Message
to EventData
and vice versa.-
Constructor Summary
ConstructorDescriptionConstruct the message converter with defaultObjectMapper
.EventHubsMessageConverter
(ObjectMapper objectMapper) Construct the message converter with customizedObjectMapper
. -
Method Summary
Modifier and TypeMethodDescriptionbuildCustomHeaders
(com.azure.messaging.eventhubs.EventData azureMessage) protected com.azure.messaging.eventhubs.EventData
fromByte
(byte[] payload) protected com.azure.messaging.eventhubs.EventData
fromString
(String payload) protected ObjectMapper
protected byte[]
getPayload
(com.azure.messaging.eventhubs.EventData azureMessage) protected void
setCustomHeaders
(org.springframework.messaging.MessageHeaders headers, com.azure.messaging.eventhubs.EventData azureMessage) Methods inherited from class com.azure.spring.messaging.converter.AbstractAzureMessageConverter
fromMessage, fromPayload, internalToMessage, toMessage, toPayload
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.spring.messaging.converter.AzureMessageConverter
toMessage
-
Constructor Details
-
EventHubsMessageConverter
public EventHubsMessageConverter()Construct the message converter with defaultObjectMapper
. -
EventHubsMessageConverter
Construct the message converter with customizedObjectMapper
.- Parameters:
objectMapper
- the object mapper.
-
-
Method Details
-
getObjectMapper
- Specified by:
getObjectMapper
in classAbstractAzureMessageConverter<com.azure.messaging.eventhubs.EventData,
com.azure.messaging.eventhubs.EventData>
-
getPayload
protected byte[] getPayload(com.azure.messaging.eventhubs.EventData azureMessage) - Specified by:
getPayload
in classAbstractAzureMessageConverter<com.azure.messaging.eventhubs.EventData,
com.azure.messaging.eventhubs.EventData>
-
fromString
- Specified by:
fromString
in classAbstractAzureMessageConverter<com.azure.messaging.eventhubs.EventData,
com.azure.messaging.eventhubs.EventData>
-
fromByte
protected com.azure.messaging.eventhubs.EventData fromByte(byte[] payload) - Specified by:
fromByte
in classAbstractAzureMessageConverter<com.azure.messaging.eventhubs.EventData,
com.azure.messaging.eventhubs.EventData>
-
setCustomHeaders
protected void setCustomHeaders(org.springframework.messaging.MessageHeaders headers, com.azure.messaging.eventhubs.EventData azureMessage) - Overrides:
setCustomHeaders
in classAbstractAzureMessageConverter<com.azure.messaging.eventhubs.EventData,
com.azure.messaging.eventhubs.EventData>
-
buildCustomHeaders
protected Map<String,Object> buildCustomHeaders(com.azure.messaging.eventhubs.EventData azureMessage) - Overrides:
buildCustomHeaders
in classAbstractAzureMessageConverter<com.azure.messaging.eventhubs.EventData,
com.azure.messaging.eventhubs.EventData>
-