public final class CloudEvent extends Object
Modifier and Type | Field and Description |
---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
OBJECT_MAPPER
Shared Json serializer/deserializer as per Jackson's documentation.
|
Constructor and Description |
---|
CloudEvent(String id,
String source,
String type,
String specversion,
String datacontenttype,
String data)
Instantiates a new input request.
|
Modifier and Type | Method and Description |
---|---|
static CloudEvent |
deserialize(byte[] payload)
Deserialized a message topic from Dapr.
|
boolean |
equals(Object o) |
String |
getData()
Gets the payload.
|
String |
getDatacontenttype()
Gets the type of the payload.
|
String |
getId()
Gets the identifier of the message being processed.
|
String |
getSource()
Gets the source for this event.
|
String |
getSpecversion()
Gets the version of the event spec.
|
String |
getType()
Gets the type of event.
|
int |
hashCode() |
protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
public CloudEvent(String id, String source, String type, String specversion, String datacontenttype, String data)
id
- Identifier of the message being processed.source
- Source for this event.type
- Type of event.specversion
- Version of the event spec.datacontenttype
- Type of the payload.data
- Payload.public String getId()
public String getSource()
public String getType()
public String getSpecversion()
public String getDatacontenttype()
public String getData()
public static CloudEvent deserialize(byte[] payload) throws IOException
payload
- Payload sent from Dapr.IOException
- If cannot parse.Copyright © 2020. All rights reserved.