Record Class NuggetAdminCommandRequest<T>
java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetAdminCommandRequest<T>
- Type Parameters:
T- typed payload family- Record Components:
context- shared request contextpayload- typed request payload, ornullfor capability queriespayloadType- stable public payload type id for schema diagnostics
public record NuggetAdminCommandRequest<T>(NuggetAdminRequestContext context, T payload, String payloadType)
extends Record
Shared public envelope for one typed admin operation request.
The envelope references an existing typed request payload or a small
contract DTO. It deliberately rejects strings and maps as payloads so callers
cannot smuggle command-line text, free-form method names, or arbitrary JSON
object maps into a second dispatch model. Service implementations must still
evaluate the typed family directly and must not use this envelope as a
reflection router. The operation family binding is owned by
NuggetAdminOperationKind; construction validates the request protocol
version through NuggetAdminRequestContext, the operation kind, the
exact public DTO payload family, the null-payload policy, and the stable
payload type token before a provider can receive the request.
Instances are immutable and thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionNuggetAdminCommandRequest(NuggetAdminRequestContext context, T payload, String payloadType) Creates a validated immutable command request. -
Method Summary
Modifier and TypeMethodDescriptioncontext()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.payload()Returns the value of thepayloadrecord component.Returns the value of thepayloadTyperecord component.toString()
-
Constructor Details
-
NuggetAdminCommandRequest
Creates a validated immutable command request.
-
-
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). -
context
-
payload
-
payloadType
Returns the value of thepayloadTyperecord component.- Returns:
- the value of the
payloadTyperecord component
-