Record Class JsonConfig

java.lang.Object
java.lang.Record
dev.tachyonmcp.api.server.config.JsonConfig
Record Components:
serializer - payload serializer, or null to keep the server default
deserializer - payload deserializer, or null to keep the server default
inputValidator - input schema validator, or null to keep the server default
outputValidator - output schema validator, or null to keep the server default
schemaFactory - parses/validates encoded JSON schemas, or null to keep the server default

public record JsonConfig(@Nullable PayloadSerializer serializer, @Nullable PayloadDeserializer deserializer, @Nullable JsonSchemaValidator inputValidator, @Nullable JsonSchemaValidator outputValidator, @Nullable JsonSchemaFactory<String> schemaFactory) extends Record
JSON payload configuration for the server: serializer, deserializer, schema validators, and schema parsing factory.
Author:
Konstantin Pavlov
  • Constructor Details

  • Method Details

    • builder

      public static JsonConfig.Builder builder()
    • 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.
    • serializer

      public @Nullable PayloadSerializer serializer()
      Returns the value of the serializer record component.
      Returns:
      the value of the serializer record component
    • deserializer

      public @Nullable PayloadDeserializer deserializer()
      Returns the value of the deserializer record component.
      Returns:
      the value of the deserializer record component
    • inputValidator

      public @Nullable JsonSchemaValidator inputValidator()
      Returns the value of the inputValidator record component.
      Returns:
      the value of the inputValidator record component
    • outputValidator

      public @Nullable JsonSchemaValidator outputValidator()
      Returns the value of the outputValidator record component.
      Returns:
      the value of the outputValidator record component
    • schemaFactory

      public @Nullable JsonSchemaFactory<String> schemaFactory()
      Returns the value of the schemaFactory record component.
      Returns:
      the value of the schemaFactory record component