Package akka.javasdk
Interface CloudEvent
public interface CloudEvent
CloudEvent representation of Metadata.
-
Method Summary
Modifier and TypeMethodDescriptionReturn this CloudEvent represented as Metadata.Clear the data content type of this CloudEvent, if set.Clear the data schema of this CloudEvent, if set.Clear the subject of this CloudEvent, if set.Clear the time of this CloudEvent, if set.The data content type of this CloudEvent.The data schema of this CloudEvent.id()
The id of this CloudEvent.static CloudEvent
Create a CloudEvent.source()
The source of this CloudEvent.The CloudEvent spec version.subject()
The subject of this CloudEvent.time()
The time of this CloudEvent.type()
The type of this CloudEvent.withDatacontenttype
(String datacontenttype) Return a new CloudEvent with the given data content type.withDataschema
(URI dataschema) Return a new CloudEvent with the given data schema.Return a new CloudEvent with the given id.withSource
(URI source) Return a new CloudEvent with the given source.withSubject
(String subject) Return a new CloudEvent with the given subject.withTime
(ZonedDateTime time) Return a new CloudEvent with the given time.Return a new CloudEvent with the given type.
-
Method Details
-
specversion
String specversion()The CloudEvent spec version.- Returns:
- The spec version.
-
id
String id()The id of this CloudEvent.- Returns:
- The id.
-
withId
Return a new CloudEvent with the given id.- Parameters:
id
- The id to set.- Returns:
- A copy of this CloudEvent.
-
source
URI source()The source of this CloudEvent.- Returns:
- The source.
-
withSource
Return a new CloudEvent with the given source.- Parameters:
source
- The source to set.- Returns:
- A copy of this CloudEvent.
-
type
String type()The type of this CloudEvent.- Returns:
- The type.
-
withType
Return a new CloudEvent with the given type.- Parameters:
type
- The type to set.- Returns:
- A copy of this CloudEvent.
-
datacontenttype
The data content type of this CloudEvent.- Returns:
- The data content type, if set.
-
withDatacontenttype
Return a new CloudEvent with the given data content type.- Parameters:
datacontenttype
- The data content type to set.- Returns:
- A copy of this CloudEvent.
-
clearDatacontenttype
CloudEvent clearDatacontenttype()Clear the data content type of this CloudEvent, if set.- Returns:
- A copy of this CloudEvent.
-
dataschema
The data schema of this CloudEvent.- Returns:
- The data schema, if set.
-
withDataschema
Return a new CloudEvent with the given data schema.- Parameters:
dataschema
- The data schema to set.- Returns:
- A copy of this CloudEvent.
-
clearDataschema
CloudEvent clearDataschema()Clear the data schema of this CloudEvent, if set.- Returns:
- A copy of this CloudEvent.
-
subject
The subject of this CloudEvent.- Returns:
- The subject, if set.
-
withSubject
Return a new CloudEvent with the given subject.- Parameters:
subject
- The subject to set.- Returns:
- A copy of this CloudEvent.
-
clearSubject
CloudEvent clearSubject()Clear the subject of this CloudEvent, if set.- Returns:
- A copy of this CloudEvent.
-
time
Optional<ZonedDateTime> time()The time of this CloudEvent.- Returns:
- The time, if set.
-
withTime
Return a new CloudEvent with the given time.- Parameters:
time
- The time to set.- Returns:
- A copy of this CloudEvent.
-
clearTime
CloudEvent clearTime()Clear the time of this CloudEvent, if set.- Returns:
- A copy of this CloudEvent.
-
asMetadata
Metadata asMetadata()Return this CloudEvent represented as Metadata.If this CloudEvent was created by {
Metadata.asCloudEvent()
}, then any non CloudEvent metadata that was present will still be present.- Returns:
- This CloudEvent expressed as metadata.
-
of
Create a CloudEvent.- Parameters:
id
- The id of the CloudEvent.source
- The source of the CloudEvent.type
- The type of the CloudEvent.- Returns:
- The newly created CloudEvent.
-