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 class
serviceName - logical service identity
contractId - explicit stable contract ID
contractVersion - positive required version
qualifiers - exact custom qualifiers
registryContext - registry/application isolation context
refresh - 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 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 interface
      serviceName - exact nonblank name, at most256 characters
      contractId - required nonblank identity, at most512 characters
      contractVersion - positive contract version
      qualifiers - at most16 exact qualifier identities
      registryContext - required context, at most256 characters
      refresh - explicit mode
      Throws:
      IllegalArgumentException - for invalid contracts or bounds
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      public Class<T> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • serviceName

      public String serviceName()
      Returns the value of the serviceName record component.
      Returns:
      the value of the serviceName record component
    • contractId

      public String contractId()
      Returns the value of the contractId record component.
      Returns:
      the value of the contractId record component
    • contractVersion

      public int contractVersion()
      Returns the value of the contractVersion record component.
      Returns:
      the value of the contractVersion record component
    • qualifiers

      public List<ManagedQualifier> qualifiers()
      Returns the value of the qualifiers record component.
      Returns:
      the value of the qualifiers record component
    • registryContext

      public String registryContext()
      Returns the value of the registryContext record component.
      Returns:
      the value of the registryContext record component
    • refresh

      public BindingRefresh refresh()
      Returns the value of the refresh record component.
      Returns:
      the value of the refresh record component