Package com.onec.kafka
Record Class InboundEvent
java.lang.Object
java.lang.Record
com.onec.kafka.InboundEvent
public record InboundEvent(String id, String source, String type, String subject, OffsetDateTime time, String data)
extends Record
A decoded inbound CloudEvent delivered to
EventHandlers. The data()
payload is the raw JSON body; handlers deserialize it into their own type.-
Constructor Summary
ConstructorsConstructorDescriptionInboundEvent(String id, String source, String type, String subject, OffsetDateTime time, String data) Creates an instance of aInboundEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord 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.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
-
InboundEvent
public InboundEvent(String id, String source, String type, String subject, OffsetDateTime time, String data) Creates an instance of aInboundEventrecord class.- Parameters:
id- the value for theidrecord componentsource- the value for thesourcerecord componenttype- the value for thetyperecord componentsubject- the value for thesubjectrecord componenttime- the value for thetimerecord 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). -
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
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-