public final class AmqpConstants extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
APP_PROPERTY_SPEC_VERSION |
static Map<String,String> |
ATTRIBUTES_TO_PROPERTYNAMES
Map a cloud event attribute name to a value.
|
static String |
CE_PREFIX
The prefix name for CloudEvent attributes for use in the application-properties section
of an AMQP 1.0 message.
|
static String |
PROPERTY_CONTENT_TYPE
The AMQP 1.0 content-type message property
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getApplicationProperty(ApplicationProperties props,
String name,
Class<T> type)
Gets the value of a specific application property.
|
static byte[] |
getPayloadAsByteArray(Section payload)
Parses a message payload into a byte array.
|
public static final String CE_PREFIX
public static final String PROPERTY_CONTENT_TYPE
public static final Map<String,String> ATTRIBUTES_TO_PROPERTYNAMES
public static final String APP_PROPERTY_SPEC_VERSION
public static <T> T getApplicationProperty(ApplicationProperties props, String name, Class<T> type)
T - The expected type of the property to retrieve.props - The application properties to retrieve the value from.name - The name of the application property.type - The expected value type.null if the properties do not contain a value of the expected type for the given
name.public static byte[] getPayloadAsByteArray(Section payload)
The bytes in the array are determined as follows:
null is returned.payload - The message payload to extract the bytes from.null if the above stated conditions are not met.Copyright © 2022. All rights reserved.