Class DefaultIncomingKafkaCloudEventMetadata<K,​T>

    • Constructor Detail

    • Method Detail

      • getSource

        public URI getSource()
        Description copied from interface: CloudEventMetadata
        Identifies the context in which an event happened. Mandatory attribute.
        Specified by:
        getSource in interface CloudEventMetadata<K>
        Returns:
        the source, cannot be null
      • getSpecVersion

        public String getSpecVersion()
        Description copied from interface: CloudEventMetadata
        The version of the CloudEvents specification which the event uses. Mandatory attribute.
        Specified by:
        getSpecVersion in interface CloudEventMetadata<K>
        Returns:
        the specification version
      • getType

        public String getType()
        Description copied from interface: CloudEventMetadata
        This attribute contains a value describing the type of event related to the originating occurrence. Mandatory attribute.
        Specified by:
        getType in interface CloudEventMetadata<K>
        Returns:
        the type
      • getSubject

        public Optional<String> getSubject()
        Description copied from interface: CloudEventMetadata
        This describes the subject of the event in the context of the event producer (identified by source).
        Specified by:
        getSubject in interface CloudEventMetadata<K>
        Returns:
        the subject if any, empty if none
      • getExtension

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

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

        public T getData()
        Description copied from interface: CloudEventMetadata
        The event payload. It is the owner message payload.
        Specified by:
        getData in interface CloudEventMetadata<K>
        Returns:
        the payload, can be null