Package com.onec.kafka
Record Class CloudEvent
java.lang.Object
java.lang.Record
com.onec.kafka.CloudEvent
-
Constructor Summary
ConstructorsConstructorDescriptionCloudEvent(String specversion, String id, String source, String type, String subject, OffsetDateTime time, String datacontenttype, String data) Creates an instance of aCloudEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.Returns the value of thedatacontenttyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.source()Returns the value of thesourcerecord component.Returns the value of thespecversionrecord component.subject()Returns the value of thesubjectrecord component.time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
CloudEvent
public CloudEvent(String specversion, String id, String source, String type, String subject, OffsetDateTime time, String datacontenttype, String data) Creates an instance of aCloudEventrecord class.- Parameters:
specversion- the value for thespecversionrecord componentid- the value for theidrecord componentsource- the value for thesourcerecord componenttype- the value for thetyperecord componentsubject- the value for thesubjectrecord componenttime- the value for thetimerecord componentdatacontenttype- the value for thedatacontenttyperecord componentdata- the value for thedatarecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
specversion
Returns the value of thespecversionrecord component.- Returns:
- the value of the
specversionrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
datacontenttype
Returns the value of thedatacontenttyperecord component.- Returns:
- the value of the
datacontenttyperecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-