Record Class McpServerStreamable

java.lang.Object
java.lang.Record
com.github.codeboyzhou.mcp.declarative.configuration.McpServerStreamable

public record McpServerStreamable(String mcpEndpoint, Boolean disallowDelete, Long keepAliveInterval, Integer port) extends Record
This record represents the streamable http server configuration for an MCP (Model Context Protocol) server.

It contains properties such as the MCP endpoint, disallow delete flag, keep-alive interval, and port.

作者:
codeboyzhou
另请参阅:
  • 构造器详细资料

    • McpServerStreamable

      public McpServerStreamable(String mcpEndpoint, Boolean disallowDelete, Long keepAliveInterval, Integer port)
      创建 McpServerStreamable 记录的实例。
      参数:
      mcpEndpoint - mcpEndpoint 记录组件的值
      disallowDelete - disallowDelete 记录组件的值
      keepAliveInterval - keepAliveInterval 记录组件的值
      port - port 记录组件的值
  • 方法详细资料

    • builder

      public static McpServerStreamable.Builder builder()
      Creates a new instance of Builder to build McpServerStreamable.
      返回:
      A new instance of Builder.
    • getDefault

      public static McpServerStreamable getDefault()
      Returns the default streamable http server configuration of the MCP server.

      By default, the MCP endpoint is "/mcp/streamable", the disallow delete flag is false, the keep-alive interval is 10000 milliseconds, and the port is 8080.

      返回:
      The default streamable http server configuration of the MCP server.
    • toString

      public final String toString()
      返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。
      指定者:
      toString 在类中 Record
      返回:
      此对象的字符串表示形式
    • hashCode

      public final int hashCode()
      返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。
      指定者:
      hashCode 在类中 Record
      返回:
      此对象的哈希代码值
    • equals

      public final boolean equals(Object o)
      指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录中的所有组件都使用 Objects::equals(Object,Object) 进行比较。
      指定者:
      equals 在类中 Record
      参数:
      o - 要与之进行比较的对象
      返回:
      如果此对象与 o 参数相同,则为 true;否则为 false
    • mcpEndpoint

      public String mcpEndpoint()
      返回 mcpEndpoint 记录组件的值。
      返回:
      mcpEndpoint 记录组件的值
    • disallowDelete

      public Boolean disallowDelete()
      返回 disallowDelete 记录组件的值。
      返回:
      disallowDelete 记录组件的值
    • keepAliveInterval

      public Long keepAliveInterval()
      返回 keepAliveInterval 记录组件的值。
      返回:
      keepAliveInterval 记录组件的值
    • port

      public Integer port()
      返回 port 记录组件的值。
      返回:
      port 记录组件的值