Interface CloudEventMetadata<T>

    • Method Detail

      • getId

        String getId()
        Identifies the event. Mandatory attribute.
        Returns:
        the id, cannot be null
      • getSource

        URI getSource()
        Identifies the context in which an event happened. Mandatory attribute.
        Returns:
        the source, cannot be null
      • getSpecVersion

        String getSpecVersion()
        The version of the CloudEvents specification which the event uses. Mandatory attribute.
        Returns:
        the specification version
      • getType

        String getType()
        This attribute contains a value describing the type of event related to the originating occurrence. Mandatory attribute.
        Returns:
        the type
      • getDataContentType

        Optional<String> getDataContentType()
        Content type of data value.
        Returns:
        the content type if any, empty if none.
      • getDataSchema

        Optional<URI> getDataSchema()
        Identifies the schema that data adheres to.
        Returns:
        the schema URI if any, empty if none.
      • getSubject

        Optional<String> getSubject()
        This describes the subject of the event in the context of the event producer (identified by source).
        Returns:
        the subject if any, empty if none
      • getTimeStamp

        Optional<ZonedDateTime> getTimeStamp()
        Timestamp of when the occurrence happened.
        Returns:
        the timestamp if any, empty if none
      • getExtension

        <A> Optional<A> getExtension​(String name)
        A CloudEvent may include any number of additional context attributes with distinct names, known as "extension attributes". This method allows retrieving these attributes.
        Parameters:
        name - the name of the attribute, must not be null
        Returns:
        the value of the attribute, empty if not present.
      • getExtensions

        Map<String,​Object> getExtensions()
        A CloudEvent may include any number of additional context attributes with distinct names, known as "extension attributes". This method allows retrieving these attributes.
        Returns:
        the map of extension attributes, potentially empty.
      • getData

        T getData()
        The event payload. It is the owner message payload.
        Returns:
        the payload, can be null