Record Class McpServerConfiguration

java.lang.Object
java.lang.Record
com.github.thought2code.mcp.annotated.configuration.McpServerConfiguration

public record McpServerConfiguration(String profile, Boolean enabled, ServerMode mode, String name, String version, ServerType type, String instructions, Long requestTimeout, McpServerCapabilities capabilities, McpServerChangeNotification changeNotification, McpServerSSE sse, McpServerStreamable streamable) extends Record
This record represents the configuration of an MCP (Model Context Protocol) server.

It contains various properties such as enabled status, server mode, name, version, type, instructions, request timeout, capabilities, change notification, SSE (Server-Sent Events), and streamable configuration.

Author:
codeboyzhou
See Also:
  • Constructor Details

    • McpServerConfiguration

      public McpServerConfiguration(String profile, Boolean enabled, ServerMode mode, String name, String version, ServerType type, String instructions, Long requestTimeout, McpServerCapabilities capabilities, McpServerChangeNotification changeNotification, McpServerSSE sse, McpServerStreamable streamable)
      Creates an instance of a McpServerConfiguration record class.
      Parameters:
      profile - the value for the profile record component
      enabled - the value for the enabled record component
      mode - the value for the mode record component
      name - the value for the name record component
      version - the value for the version record component
      type - the value for the type record component
      instructions - the value for the instructions record component
      requestTimeout - the value for the requestTimeout record component
      capabilities - the value for the capabilities record component
      changeNotification - the value for the changeNotification record component
      sse - the value for the sse record component
      streamable - the value for the streamable record component
  • Method Details

    • builder

      public static McpServerConfiguration.Builder builder()
      Creates a new instance of Builder to build McpServerConfiguration.
      Returns:
      A new instance of 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.
    • profile

      public String profile()
      Returns the value of the profile record component.
      Returns:
      the value of the profile record component
    • enabled

      public Boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • mode

      public ServerMode mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • type

      public ServerType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • instructions

      public String instructions()
      Returns the value of the instructions record component.
      Returns:
      the value of the instructions record component
    • requestTimeout

      public Long requestTimeout()
      Returns the value of the requestTimeout record component.
      Returns:
      the value of the requestTimeout record component
    • capabilities

      public McpServerCapabilities capabilities()
      Returns the value of the capabilities record component.
      Returns:
      the value of the capabilities record component
    • changeNotification

      public McpServerChangeNotification changeNotification()
      Returns the value of the changeNotification record component.
      Returns:
      the value of the changeNotification record component
    • sse

      public McpServerSSE sse()
      Returns the value of the sse record component.
      Returns:
      the value of the sse record component
    • streamable

      public McpServerStreamable streamable()
      Returns the value of the streamable record component.
      Returns:
      the value of the streamable record component