public final class EventDataImpl extends Object implements EventData
EventData.SystemProperties| Constructor and Description |
|---|
EventDataImpl(byte[] data) |
EventDataImpl(byte[] data,
int offset,
int length) |
EventDataImpl(ByteBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(EventData other) |
byte[] |
getBytes()
Get Actual Payload/Data wrapped by EventData.
|
Object |
getObject()
Use this method only if, the sender could be sending messages using third-party AMQP libraries.
|
Map<String,Object> |
getProperties()
Application property bag
|
EventData.SystemProperties |
getSystemProperties()
SystemProperties that are populated by EventHubService.
|
public EventDataImpl(byte[] data)
public EventDataImpl(byte[] data,
int offset,
int length)
public EventDataImpl(ByteBuffer buffer)
public Object getObject()
EventDataIf all the senders of EventHub use client libraries released and maintained by Microsoft Azure EventHubs, use EventData.getBytes() method.
Get the value of AMQP messages' Body section on the received EventData.
If the AMQP message Body is always guaranteed to have Data section, use EventData.getBytes() method.
public byte[] getBytes()
EventDatagetBytes in interface EventDatanull if the body of the message has other inter-operable AMQP messages, whose body does not represent byte[].
In that case use EventData.getObject().
public Map<String,Object> getProperties()
EventDatagetProperties in interface EventDatapublic EventData.SystemProperties getSystemProperties()
EventDataAs these are populated by Service, they are only present on a Received EventData.
Usage:
final String offset = eventData.getSystemProperties().getOffset();
getSystemProperties in interface EventDatanull if the EventData is not received and is created by the public constructors.EventData.SystemProperties.getOffset(),
EventData.SystemProperties.getSequenceNumber(),
EventData.SystemProperties.getPartitionKey(),
EventData.SystemProperties.getEnqueuedTime()public int compareTo(EventData other)
compareTo in interface Comparable<EventData>Copyright © 2019. All rights reserved.