public class AttributesImpl extends Object implements Attributes
| Constructor and Description |
|---|
AttributesImpl(String id,
URI source,
String specversion,
String type,
String datacontenttype,
URI dataschema,
String subject,
ZonedDateTime time) |
| Modifier and Type | Method and Description |
|---|---|
static AttributesImpl |
build(String id,
URI source,
String specversion,
String type,
String datacontenttype,
URI dataschema,
String subject,
ZonedDateTime time)
Used by the Jackson framework to unmarshall.
|
Optional<String> |
getDatacontenttype() |
Optional<URI> |
getDataschema() |
String |
getId() |
Optional<String> |
getMediaType()
A common way to get the media type of CloudEvents 'data';
|
URI |
getSource() |
String |
getSpecversion() |
Optional<String> |
getSubject() |
Optional<ZonedDateTime> |
getTime() |
String |
getType() |
static Map<String,String> |
marshal(AttributesImpl attributes)
Creates the marshaller instance to marshall
AttributesImpl as
a Map of strings |
String |
toString() |
static AttributesImpl |
unmarshal(Map<String,String> attributes)
The attribute unmarshaller for the binary format, that receives a
Map with attributes names as String and value as String. |
public Optional<String> getMediaType()
AttributesgetMediaType in interface Attributespublic String getId()
getId in interface Attributespublic URI getSource()
getSource in interface Attributespublic String getSpecversion()
getSpecversion in interface Attributespublic String getType()
getType in interface Attributespublic Optional<ZonedDateTime> getTime()
public static AttributesImpl build(String id, URI source, String specversion, String type, String datacontenttype, URI dataschema, String subject, ZonedDateTime time)
public static Map<String,String> marshal(AttributesImpl attributes)
AttributesImpl as
a Map of stringspublic static AttributesImpl unmarshal(Map<String,String> attributes)
Map with attributes names as String and value as String.Copyright © 2020. All rights reserved.