Record Class ManagedUsagePayload
java.lang.Object
java.lang.Record
org.j7m.middleware.examples.annotation.ManagedUsagePayload
- Record Components:
message- required application textpriority- optional priority, defaulting to7 when absent on the wire
@SchemaType(id="examples.annotation.payload",
version=1)
public record ManagedUsagePayload(@WireField(id=1) String message, @WireField(id=2,required=false,hasDefault=true,defaultValue="7") Integer priority)
extends Record
Explicit wire schema whose numeric field identities survive Java component renames.
J7M teaching: numeric field identities keep wire compatibility independent of Java member spelling.
-
Constructor Summary
ConstructorsConstructorDescriptionManagedUsagePayload(String message, Integer priority) Creates an instance of aManagedUsagePayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.priority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ManagedUsagePayload
-
-
Method Details
-
toString
-
hashCode
-
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). -
message
-
priority
-