public class XMLFormat extends Object implements EventFormat
EventFormat for the XML Format.
This format is resolvable with EventFormatProvider using the content type XML_CONTENT_TYPE.
This EventFormat only works for SpecVersion.V1, as that was the first version the XML format was defined for.
| Modifier and Type | Field and Description |
|---|---|
static String |
XML_CONTENT_TYPE
The content type for transports sending cloudevents in XML format.
|
| Constructor and Description |
|---|
XMLFormat() |
| Modifier and Type | Method and Description |
|---|---|
io.cloudevents.CloudEvent |
deserialize(byte[] bytes,
io.cloudevents.rw.CloudEventDataMapper<? extends io.cloudevents.CloudEventData> mapper) |
byte[] |
serialize(io.cloudevents.CloudEvent event) |
String |
serializedContentType() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeserializableContentTypes, deserializepublic static final String XML_CONTENT_TYPE
public byte[] serialize(io.cloudevents.CloudEvent event)
throws EventSerializationException
serialize in interface EventFormatEventSerializationExceptionpublic io.cloudevents.CloudEvent deserialize(byte[] bytes,
io.cloudevents.rw.CloudEventDataMapper<? extends io.cloudevents.CloudEventData> mapper)
throws EventDeserializationException
deserialize in interface EventFormatEventDeserializationExceptionpublic String serializedContentType()
serializedContentType in interface EventFormatCopyright © 2024. All rights reserved.