public class AttributesImpl extends Object implements Attributes
| Modifier and Type | Method and Description |
|---|---|
static AttributesImpl |
build(String id,
URI source,
String specversion,
String type,
ZonedDateTime time,
URI schemaurl,
String contenttype) |
Optional<String> |
getContenttype()
Describe the data encoding format
|
String |
getId()
ID of the event.
|
Optional<String> |
getMediaType()
A common way to get the media type of CloudEvents 'data';
|
Optional<URI> |
getSchemaurl()
A link to the schema that the data attribute adheres to.
|
URI |
getSource()
This describes the event producer.
|
String |
getSpecversion()
The version of the CloudEvents specification which the event uses.
|
Optional<ZonedDateTime> |
getTime()
Timestamp of when the event happened.
|
String |
getType()
Type of occurrence which has happened.
|
static Map<String,String> |
marshal(AttributesImpl attributes)
Creates the marshaller instance to marshall
AttributesImpl as
a Map of strings |
static AttributesImpl |
unmarshal(Map<String,String> attributes)
The attribute unmarshaller for the binary format, that receives a
Map with attributes names as String and values as String. |
public String getType()
public String getId()
public String getSpecversion()
public URI getSource()
public Optional<ZonedDateTime> getTime()
public Optional<URI> getSchemaurl()
public Optional<String> getMediaType()
getMediaType in interface Attributespublic static AttributesImpl build(String id, URI source, String specversion, String type, ZonedDateTime time, URI schemaurl, String contenttype)
public static AttributesImpl unmarshal(Map<String,String> attributes)
Map with attributes names as String and values as String.public static Map<String,String> marshal(AttributesImpl attributes)
AttributesImpl as
a Map of stringsCopyright © 2019. All rights reserved.