Class BaseCloudEvent

java.lang.Object
io.cloudevents.core.impl.BaseCloudEvent
All Implemented Interfaces:
io.cloudevents.CloudEvent, io.cloudevents.CloudEventAttributes, io.cloudevents.CloudEventContext, io.cloudevents.CloudEventExtensions, io.cloudevents.rw.CloudEventContextReader, io.cloudevents.rw.CloudEventReader
Direct Known Subclasses:
CloudEventV03, CloudEventV1

public abstract class BaseCloudEvent extends Object implements io.cloudevents.CloudEvent, io.cloudevents.rw.CloudEventReader, io.cloudevents.rw.CloudEventContextReader
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<String,Object>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    BaseCloudEvent(io.cloudevents.CloudEventData data, Map<String,Object> extensions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.cloudevents.CloudEventData
     
    getExtension(String extensionName)
     
     
    <T extends io.cloudevents.rw.CloudEventWriter<V>, V>
    V
    read(io.cloudevents.rw.CloudEventWriterFactory<T,V> writerFactory, io.cloudevents.rw.CloudEventDataMapper<? extends io.cloudevents.CloudEventData> mapper)
     
    protected void
    readExtensions(io.cloudevents.rw.CloudEventContextWriter writer)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.cloudevents.CloudEventAttributes

    getAttribute, getAttributeNames, getDataContentType, getDataSchema, getId, getSource, getSpecVersion, getSubject, getTime, getType

    Methods inherited from interface io.cloudevents.rw.CloudEventContextReader

    readContext

    Methods inherited from interface io.cloudevents.rw.CloudEventReader

    read
  • Field Details

  • Constructor Details

    • BaseCloudEvent

      protected BaseCloudEvent(io.cloudevents.CloudEventData data, Map<String,Object> extensions)
  • Method Details

    • getData

      public io.cloudevents.CloudEventData getData()
      Specified by:
      getData in interface io.cloudevents.CloudEvent
    • getExtension

      public Object getExtension(String extensionName)
      Specified by:
      getExtension in interface io.cloudevents.CloudEventExtensions
    • getExtensionNames

      public Set<String> getExtensionNames()
      Specified by:
      getExtensionNames in interface io.cloudevents.CloudEventExtensions
    • read

      public <T extends io.cloudevents.rw.CloudEventWriter<V>, V> V read(io.cloudevents.rw.CloudEventWriterFactory<T,V> writerFactory, io.cloudevents.rw.CloudEventDataMapper<? extends io.cloudevents.CloudEventData> mapper) throws io.cloudevents.rw.CloudEventRWException, IllegalStateException
      Specified by:
      read in interface io.cloudevents.rw.CloudEventReader
      Throws:
      io.cloudevents.rw.CloudEventRWException
      IllegalStateException
    • readExtensions

      protected void readExtensions(io.cloudevents.rw.CloudEventContextWriter writer) throws io.cloudevents.rw.CloudEventRWException
      Throws:
      io.cloudevents.rw.CloudEventRWException