类 McpStreamableServerInfo.Builder
java.lang.Object
com.github.codeboyzhou.mcp.declarative.server.McpServerInfo.Builder<McpStreamableServerInfo.Builder>
com.github.codeboyzhou.mcp.declarative.server.McpStreamableServerInfo.Builder
public static class McpStreamableServerInfo.Builder
extends McpServerInfo.Builder<McpStreamableServerInfo.Builder>
The builder class for
McpStreamableServerInfo.- 另请参阅:
-
字段概要
从类继承的字段 com.github.codeboyzhou.mcp.declarative.server.McpServerInfo.Builder
capabilities, changeNotification, instructions, name, requestTimeout, version -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Builds a newMcpStreamableServerInfoinstance with the specified builder.contextExtractor(io.modelcontextprotocol.server.McpTransportContextExtractor<jakarta.servlet.http.HttpServletRequest> contextExtractor) Sets the extractor to extract the transport context from the HTTP request.disallowDelete(boolean disallowDelete) Sets whether to disallow http delete requests.keepAliveInterval(Duration keepAliveInterval) Sets the interval to send keep-alive messages.mcpEndpoint(String mcpEndpoint) Sets the endpoint of the MCP server to send messages.port(int port) Sets the port of the MCP HTTP server.protected McpStreamableServerInfo.Builderself()Returns the self reference of the builder, which is used to chain the method calls.从类继承的方法 com.github.codeboyzhou.mcp.declarative.server.McpServerInfo.Builder
capabilities, changeNotification, instructions, name, requestTimeout, version
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
self
Returns the self reference of the builder, which is used to chain the method calls.- 覆盖:
self在类中McpServerInfo.Builder<McpStreamableServerInfo.Builder>- 返回:
- the self reference of the builder
-
build
Builds a newMcpStreamableServerInfoinstance with the specified builder.- 覆盖:
build在类中McpServerInfo.Builder<McpStreamableServerInfo.Builder>- 返回:
- a new
McpStreamableServerInfoinstance
-
port
Sets the port of the MCP HTTP server.- 参数:
port- the port of the MCP HTTP server- 返回:
- the self reference of the builder
-
mcpEndpoint
Sets the endpoint of the MCP server to send messages.- 参数:
mcpEndpoint- the endpoint of the MCP server to send messages- 返回:
- the self reference of the builder
-
disallowDelete
Sets whether to disallow http delete requests.- 参数:
disallowDelete- whether to disallow http delete requests- 返回:
- the self reference of the builder
-
contextExtractor
public McpStreamableServerInfo.Builder contextExtractor(io.modelcontextprotocol.server.McpTransportContextExtractor<jakarta.servlet.http.HttpServletRequest> contextExtractor) Sets the extractor to extract the transport context from the HTTP request.- 参数:
contextExtractor- the extractor to extract the transport context from the HTTP request- 返回:
- the self reference of the builder
-
keepAliveInterval
Sets the interval to send keep-alive messages.- 参数:
keepAliveInterval- the interval to send keep-alive messages- 返回:
- the self reference of the builder
-