Interface CloudEventMessageEventContext

All Superinterfaces:
EventContext

public interface CloudEventMessageEventContext extends EventContext
Describes the content of a CloudEvents structured message
  • Method Details

    • create

      static CloudEventMessageEventContext create(String event)
      Parameters:
      event - the unqualified event name of the modelled event
      Returns:
      the CloudEventMessageEventContext
    • getId

      String getId()
      The ID identifies the event.
      Returns:
      the identifier
    • setId

      void setId(String id)
      The ID identifies the event.
      Parameters:
      id - the identifier
    • getSpecVersion

      @CdsName("specversion") String getSpecVersion()
      Returns:
      The version of the CloudEvents specification which the event uses.
    • setSpecVersion

      @CdsName("specversion") void setSpecVersion(String specVersion)
      Parameters:
      specVersion - The version of the CloudEvents specification which the event uses.
    • getSource

      String getSource()
      The source identifies the instance the event originated in. The instance is an uniquely identifiable instance of a service or application including the tenant if a tenant concept is present.
      Returns:
      the source
    • setSource

      void setSource(String source)
      The source identifies the instance the event originated in. The instance is an uniquely identifiable instance of a service or application including the tenant if a tenant concept is present.
      Parameters:
      source - the source
    • getType

      String getType()
      Returns:
      the type of the event related to the source the event originated in.
    • setType

      void setType(String type)
      Parameters:
      type - the type of the event related to the source the event originated in.
    • getSubject

      String getSubject()
      Returns:
      the subject of the event in the context of the source the event originated in (e.g. a certain business object or resource).
    • setSubject

      void setSubject(String subject)
      Parameters:
      subject - the subject of the event in the context of the source the event originated in (e.g. a certain business object or resource).
    • getDataContentType

      @CdsName("datacontenttype") String getDataContentType()
      Returns:
      Content type of the event data.
      See Also:
    • setDataContentType

      @CdsName("datacontenttype") void setDataContentType(String dataContentType)
      Parameters:
      dataContentType - Content type of the event data
      See Also:
    • getDataSchema

      @CdsName("dataschema") String getDataSchema()
      Returns:
      the schema that the event data adheres to.
      See Also:
    • setDataSchema

      @CdsName("dataschema") void setDataSchema(String dataSchema)
      Parameters:
      dataSchema - the schema that the event data adheres to.
      See Also:
    • getTime

      Instant getTime()
      Returns:
      Timestamp of when the occurrence happened.
    • setTime

      void setTime(Instant time)
      Parameters:
      time - Timestamp of when the occurrence happened.
    • getData

      Map<String,Object> getData()
      Returns:
      The data (payload) of the event.
    • setData

      void setData(Map<String,Object> data)
      Parameters:
      data - The data (payload) of the event.