Record Class OutboundCall

java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.propagation.OutboundCall
Record Components:
targetServiceName - logical name of the downstream service (e.g. interface simple name)
methodName - method being called
declaredAudience - declared audience from @PropagateToken(audience = ...); empty when not declared
hints - extension-point key/value pairs

@ExperimentalJSentinelApi public record OutboundCall(String targetServiceName, String methodName, String declaredAudience, Map<String,String> hints) extends Record
Input record for OutboundTokenStrategy.resolve(OutboundCall, java.util.Optional). Describes the call the wrapper is about to issue.

hints is a free-form extension point; strategies look up specific keys (e.g. "scope" for client-credentials flows). The canonical constructor takes a defensive Map.copyOf(Map) copy so mutating the source map after construction does not leak into the record.

Since:
00.74.00
  • Constructor Details

    • OutboundCall

      public OutboundCall(String targetServiceName, String methodName, String declaredAudience, Map<String,String> hints)
      Creates an instance of a OutboundCall record class.
      Parameters:
      targetServiceName - the value for the targetServiceName record component
      methodName - the value for the methodName record component
      declaredAudience - the value for the declaredAudience record component
      hints - the value for the hints record component
  • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • targetServiceName

      public String targetServiceName()
      Returns the value of the targetServiceName record component.
      Returns:
      the value of the targetServiceName record component
    • methodName

      public String methodName()
      Returns the value of the methodName record component.
      Returns:
      the value of the methodName record component
    • declaredAudience

      public String declaredAudience()
      Returns the value of the declaredAudience record component.
      Returns:
      the value of the declaredAudience record component
    • hints

      public Map<String,String> hints()
      Returns the value of the hints record component.
      Returns:
      the value of the hints record component