public class CloudEventUtils extends Object
Constructor and Description |
---|
CloudEventUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
toCloudEvent(String message,
String defaultType,
String namespace)
Enriches the given message with cloudevents headers if not yet present
|
static CloudEventMessageEventContext |
toCloudEventMessageContext(TopicMessageEventContext context,
String eventName)
Creates the cloud event message event context from the messaging context.
|
static String |
toJson(Map<String,Object> map)
Serializes the specified map to a JSON string.
|
public static String toCloudEvent(String message, String defaultType, String namespace)
message
- the message to enrichdefaultType
- the default typenamespace
- the namespace to try to be interpreted as sourcepublic static CloudEventMessageEventContext toCloudEventMessageContext(TopicMessageEventContext context, String eventName)
context
- messaging contexteventName
- CDS event nameCloudEventMessageEventContext
Copyright © 2023. All rights reserved.