Record Class TokenPlatformClientConfig
java.lang.Object
java.lang.Record
io.confluent.kafka.odyssey.auth.TokenPlatformClientConfig
- Record Components:
tokenPlatformUrl- the Token Platform gRPC endpoint URL (required)spireAgentUrl- the SPIRE agent socket URL for mTLS authentication (required)requestTimeoutMs- gRPC request timeout in milliseconds (must be positive)maxRetries- maximum number of retry attempts for transient failures (must be non-negative)
public record TokenPlatformClientConfig(String tokenPlatformUrl, String spireAgentUrl, int requestTimeoutMs, int maxRetries)
extends Record
Immutable configuration for
TokenPlatformClient.
This record holds all configuration needed to connect to the Token Platform service using SPIRE mTLS authentication.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault max retries: 3 attemptsstatic final intDefault request timeout: 5 seconds -
Constructor Summary
ConstructorsConstructorDescriptionTokenPlatformClientConfig(String tokenPlatformUrl, String spireAgentUrl, int requestTimeoutMs, int maxRetries) Compact constructor with validation. -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenPlatformClientConfigCreates a configuration with default timeout and retry settings.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxRetriesrecord component.intReturns the value of therequestTimeoutMsrecord component.Returns the value of thespireAgentUrlrecord component.Returns the value of thetokenPlatformUrlrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_REQUEST_TIMEOUT_MS
public static final int DEFAULT_REQUEST_TIMEOUT_MSDefault request timeout: 5 seconds- See Also:
-
DEFAULT_MAX_RETRIES
public static final int DEFAULT_MAX_RETRIESDefault max retries: 3 attempts- See Also:
-
-
Constructor Details
-
TokenPlatformClientConfig
-
-
Method Details
-
create
Creates a configuration with default timeout and retry settings.- Parameters:
tokenPlatformUrl- the Token Platform gRPC endpoint URLspireAgentUrl- the SPIRE agent socket URL- Returns:
- a new configuration instance
-
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. -
tokenPlatformUrl
Returns the value of thetokenPlatformUrlrecord component.- Returns:
- the value of the
tokenPlatformUrlrecord component
-
spireAgentUrl
Returns the value of thespireAgentUrlrecord component.- Returns:
- the value of the
spireAgentUrlrecord component
-
requestTimeoutMs
public int requestTimeoutMs()Returns the value of therequestTimeoutMsrecord component.- Returns:
- the value of the
requestTimeoutMsrecord component
-
maxRetries
public int maxRetries()Returns the value of themaxRetriesrecord component.- Returns:
- the value of the
maxRetriesrecord component
-