Record Class TracedQueue.Message
java.lang.Object
java.lang.Record
org.j7m.middleware.integrations.TracedQueue.Message
- Record Components:
context- durable propagation parentpayload- application bytes, copied on construction and access
- Enclosing class:
TracedQueue
public static record TracedQueue.Message(org.j7m.middleware.distributed.TraceCarrier context, byte[] payload)
extends Record
Immutable delivery envelope.
-
Constructor Summary
ConstructorsConstructorDescriptionMessage(org.j7m.middleware.distributed.TraceCarrier context, byte[] payload) Copies and bounds application bytes. -
Method Summary
Modifier and TypeMethodDescriptionorg.j7m.middleware.distributed.TraceCarriercontext()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byte[]payload()Returns independent payload bytes.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Message
public Message(org.j7m.middleware.distributed.TraceCarrier context, byte[] payload) Copies and bounds application bytes.- Parameters:
context- immutable propagation carrierpayload- bytes, at most 30000- Throws:
IllegalArgumentException- for oversized payload
-
-
Method Details
-
payload
public byte[] payload()Returns independent payload bytes.- Returns:
- copied payload
-
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). -
context
-