Record Class ServiceBindingRequest<T>
java.lang.Object
java.lang.Record
org.j7m.middleware.application.api.ServiceBindingRequest<T>
- Type Parameters:
T- ordinary business interface- Record Components:
type- requested interface classserviceName- logical service identitycontractId- explicit stable contract IDcontractVersion- positive required versionqualifiers- exact custom qualifiersregistryContext- registry/application isolation contextrefresh- opt-in target refresh
public record ServiceBindingRequest<T>(Class<T> type, String serviceName, String contractId, int contractVersion, List<ManagedQualifier> qualifiers, String registryContext, BindingRefresh refresh)
extends Record
Immutable service selection contract. Candidate metadata is only a compatibility filter;
a mandatory host admission check establishes actual trust, authorization and readiness.
-
Constructor Summary
ConstructorsConstructorDescriptionServiceBindingRequest(Class<T> type, String serviceName, String contractId, int contractVersion, List<ManagedQualifier> qualifiers, String registryContext, BindingRefresh refresh) Validates and defensively copies selection metadata. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontractIdrecord component.intReturns the value of thecontractVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thequalifiersrecord component.refresh()Returns the value of therefreshrecord component.Returns the value of theregistryContextrecord component.Returns the value of theserviceNamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ServiceBindingRequest
public ServiceBindingRequest(Class<T> type, String serviceName, String contractId, int contractVersion, List<ManagedQualifier> qualifiers, String registryContext, BindingRefresh refresh) Validates and defensively copies selection metadata.- Parameters:
type- required ordinary interfaceserviceName- exact nonblank name, at most256 characterscontractId- required nonblank identity, at most512 characterscontractVersion- positive contract versionqualifiers- at most16 exact qualifier identitiesregistryContext- required context, at most256 charactersrefresh- explicit mode- Throws:
IllegalArgumentException- for invalid contracts or bounds
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
type
-
serviceName
Returns the value of theserviceNamerecord component.- Returns:
- the value of the
serviceNamerecord component
-
contractId
Returns the value of thecontractIdrecord component.- Returns:
- the value of the
contractIdrecord component
-
contractVersion
public int contractVersion()Returns the value of thecontractVersionrecord component.- Returns:
- the value of the
contractVersionrecord component
-
qualifiers
Returns the value of thequalifiersrecord component.- Returns:
- the value of the
qualifiersrecord component
-
registryContext
Returns the value of theregistryContextrecord component.- Returns:
- the value of the
registryContextrecord component
-
refresh
-