Record Class ValidationContext
java.lang.Object
java.lang.Record
io.confluent.kafka.odyssey.ValidationContext
public record ValidationContext(ClassifyResult classified, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient srClient, boolean srClientReady, String errorMessage)
extends Record
Context for the validation phase, containing classified topics and SR client.
Created after classification and (optionally) token acquisition.
Use ready(ClassifyResult, SchemaRegistryClient) when an SR client
is available, or notReady(ClassifyResult, String) when it could not
be created (e.g., token acquisition failed).
-
Constructor Summary
ConstructorsConstructorDescriptionValidationContext(ClassifyResult classified, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient srClient, boolean srClientReady, String errorMessage) Creates an instance of aValidationContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassifiedrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.final inthashCode()Returns a hash code value for this object.static ValidationContextnotReady(ClassifyResult classified, String errorMessage) static ValidationContextready(ClassifyResult classified, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient srClient) request()io.confluent.kafka.schemaregistry.client.SchemaRegistryClientsrClient()Returns the value of thesrClientrecord component.booleanReturns the value of thesrClientReadyrecord component.List<org.apache.kafka.common.message.CreateTopicsRequestData.CreatableTopic> final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ValidationContext
public ValidationContext(ClassifyResult classified, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient srClient, boolean srClientReady, String errorMessage) Creates an instance of aValidationContextrecord class.- Parameters:
classified- the value for theclassifiedrecord componentsrClient- the value for thesrClientrecord componentsrClientReady- the value for thesrClientReadyrecord componenterrorMessage- the value for theerrorMessagerecord component
-
-
Method Details
-
ready
public static ValidationContext ready(ClassifyResult classified, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient srClient) -
notReady
-
topicsWithOdysseyConfigs
public List<org.apache.kafka.common.message.CreateTopicsRequestData.CreatableTopic> topicsWithOdysseyConfigs() -
namespace
-
extractedAssociations
-
request
-
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. -
classified
Returns the value of theclassifiedrecord component.- Returns:
- the value of the
classifiedrecord component
-
srClient
public io.confluent.kafka.schemaregistry.client.SchemaRegistryClient srClient()Returns the value of thesrClientrecord component.- Returns:
- the value of the
srClientrecord component
-
srClientReady
public boolean srClientReady()Returns the value of thesrClientReadyrecord component.- Returns:
- the value of the
srClientReadyrecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-