Record Class ResourcesConfig
java.lang.Object
java.lang.Record
dev.tachyonmcp.core.server.config.ResourcesConfig
- Record Components:
mode- enabled/disabled/auto-detected (defaultMode.AUTO)listChanged- whether to advertise list-changed notifications (defaultfalse)pageSize- default page size when a list request omits its limitsubscribe- whether resource subscriptions (resources/subscribe) are supported (defaultfalse)
public record ResourcesConfig(Mode mode, boolean listChanged, int pageSize, boolean subscribe)
extends Record
Configuration for the resources capability: the same knobs as
FeatureConfig plus
subscription support.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionResourcesConfig(Mode mode, boolean listChanged, int pageSize, boolean subscribe) Creates an instance of aResourcesConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourcesConfig.Builderbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thelistChangedrecord component.mode()Returns the value of themoderecord component.intpageSize()Returns the value of thepageSizerecord component.booleanReturns the value of thesubscriberecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourcesConfig
Creates an instance of aResourcesConfigrecord class.- Parameters:
mode- the value for themoderecord componentlistChanged- the value for thelistChangedrecord componentpageSize- the value for thepageSizerecord componentsubscribe- the value for thesubscriberecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
listChanged
public boolean listChanged()Returns the value of thelistChangedrecord component.- Returns:
- the value of the
listChangedrecord component
-
pageSize
public int pageSize()Returns the value of thepageSizerecord component.- Returns:
- the value of the
pageSizerecord component
-
subscribe
public boolean subscribe()Returns the value of thesubscriberecord component.- Returns:
- the value of the
subscriberecord component
-