Record Class NuggetAdminCommandResult<T>
java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetAdminCommandResult<T>
- Type Parameters:
T- typed payload family- Record Components:
target- authoritative result target, ornullonly for result payloads that do not repeat target identityheader- common result headerpayload- typed result payload, ornullpayloadType- stable public payload type id for schema diagnostics
public record NuggetAdminCommandResult<T>(NuggetAdminTarget target, NuggetAdminResultHeader header, T payload, String payloadType)
extends Record
Shared public envelope for one typed admin operation result.
The payload is a typed public DTO such as an introspection collection,
lifecycle result, control result, discovery result, or capability result.
Callers must use header() for common outcome, error, count,
warning, timing, partial, and truncation semantics, then interpret
payload() according to the typed operation family. The operation
family binding is owned by NuggetAdminOperationKind; construction
validates the exact public DTO result family, the null-payload policy,
common outcome flags, mutation-only header state on read-only operations, and
the stable payload type token.
Instances are immutable and thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionNuggetAdminCommandResult(NuggetAdminResultHeader header, T payload, String payloadType) Creates an immutable command result for payloads that do not repeat the authoritative target identity.NuggetAdminCommandResult(NuggetAdminTarget target, NuggetAdminResultHeader header, T payload, String payloadType) Creates an immutable command result. -
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.header()Returns the value of theheaderrecord component.payload()Returns the value of thepayloadrecord component.Returns the value of thepayloadTyperecord component.target()Returns the value of thetargetrecord component.toString()
-
Constructor Details
-
NuggetAdminCommandResult
Creates an immutable command result for payloads that do not repeat the authoritative target identity.- Parameters:
header- common result headerpayload- typed result payload, ornullpayloadType- stable public payload type id
-
NuggetAdminCommandResult
public NuggetAdminCommandResult(NuggetAdminTarget target, NuggetAdminResultHeader header, T payload, String payloadType) Creates an immutable command result.
-
-
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). -
target
-
header
-
payload
-
payloadType
Returns the value of thepayloadTyperecord component.- Returns:
- the value of the
payloadTyperecord component
-