Package dev.tachyonmcp.api.server.config
Record Class JsonConfig
java.lang.Object
java.lang.Record
dev.tachyonmcp.api.server.config.JsonConfig
- Record Components:
serializer- payload serializer, ornullto keep the server defaultdeserializer- payload deserializer, ornullto keep the server defaultinputValidator- input schema validator, ornullto keep the server defaultoutputValidator- output schema validator, ornullto keep the server defaultschemaFactory- parses/validates encoded JSON schemas, ornullto 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
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionJsonConfig(@Nullable PayloadSerializer serializer, @Nullable PayloadDeserializer deserializer, @Nullable JsonSchemaValidator inputValidator, @Nullable JsonSchemaValidator outputValidator, @Nullable JsonSchemaFactory<String> schemaFactory) Creates an instance of aJsonConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonConfig.Builderbuilder()@Nullable PayloadDeserializerReturns the value of thedeserializerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable JsonSchemaValidatorReturns the value of theinputValidatorrecord component.@Nullable JsonSchemaValidatorReturns the value of theoutputValidatorrecord component.@Nullable JsonSchemaFactory<String> Returns the value of theschemaFactoryrecord component.@Nullable PayloadSerializerReturns the value of theserializerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JsonConfig
public JsonConfig(@Nullable PayloadSerializer serializer, @Nullable PayloadDeserializer deserializer, @Nullable JsonSchemaValidator inputValidator, @Nullable JsonSchemaValidator outputValidator, @Nullable JsonSchemaFactory<String> schemaFactory) Creates an instance of aJsonConfigrecord class.- Parameters:
serializer- the value for theserializerrecord componentdeserializer- the value for thedeserializerrecord componentinputValidator- the value for theinputValidatorrecord componentoutputValidator- the value for theoutputValidatorrecord componentschemaFactory- the value for theschemaFactoryrecord component
-
-
Method Details
-
builder
-
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
serializer
Returns the value of theserializerrecord component.- Returns:
- the value of the
serializerrecord component
-
deserializer
Returns the value of thedeserializerrecord component.- Returns:
- the value of the
deserializerrecord component
-
inputValidator
Returns the value of theinputValidatorrecord component.- Returns:
- the value of the
inputValidatorrecord component
-
outputValidator
Returns the value of theoutputValidatorrecord component.- Returns:
- the value of the
outputValidatorrecord component
-
schemaFactory
Returns the value of theschemaFactoryrecord component.- Returns:
- the value of the
schemaFactoryrecord component
-