public static class WebRxStreamableHttpTransport.Builder
extends java.lang.Object
WebRxStreamableHttpTransport.| 限定符和类型 | 方法和说明 |
|---|---|
WebRxStreamableHttpTransport |
build()
Construct a fresh instance of
WebRxStreamableHttpTransport using
the current builder configuration. |
WebRxStreamableHttpTransport.Builder |
endpoint(java.lang.String endpoint)
Configure the endpoint to make HTTP requests against.
|
WebRxStreamableHttpTransport.Builder |
jsonMapper(McpJsonMapper jsonMapper)
Configure the
McpJsonMapper to use. |
WebRxStreamableHttpTransport.Builder |
openConnectionOnStartup(boolean openConnectionOnStartup)
Configure whether the client should open an SSE connection upon startup.
|
WebRxStreamableHttpTransport.Builder |
resumableStreams(boolean resumableStreams)
Configure whether to use the stream resumability feature by keeping track of
SSE event ids.
|
WebRxStreamableHttpTransport.Builder |
supportedProtocolVersions(java.util.List<java.lang.String> supportedProtocolVersions)
Sets the list of supported protocol versions used in version negotiation.
|
WebRxStreamableHttpTransport.Builder |
webClientBuilder(org.noear.solon.net.http.HttpUtilsBuilder webClientBuilder)
Configure the
HttpUtilsBuilder to construct the HttpUtils. |
public WebRxStreamableHttpTransport.Builder jsonMapper(McpJsonMapper jsonMapper)
McpJsonMapper to use.jsonMapper - instance to usepublic WebRxStreamableHttpTransport.Builder webClientBuilder(org.noear.solon.net.http.HttpUtilsBuilder webClientBuilder)
HttpUtilsBuilder to construct the HttpUtils.webClientBuilder - instance to usepublic WebRxStreamableHttpTransport.Builder endpoint(java.lang.String endpoint)
endpoint - endpoint to usepublic WebRxStreamableHttpTransport.Builder resumableStreams(boolean resumableStreams)
resumableStreams - if true event ids will be tracked and upon
disconnection, the last seen id will be used upon reconnection as a header to
resume consuming messages.public WebRxStreamableHttpTransport.Builder openConnectionOnStartup(boolean openConnectionOnStartup)
false.openConnectionOnStartup - if true the WebRxStreamableHttpTransport.connect(Function)
method call will try to open an SSE connection before sending any JSON-RPC
requestpublic WebRxStreamableHttpTransport.Builder supportedProtocolVersions(java.util.List<java.lang.String> supportedProtocolVersions)
MCP-Protocol-Version header.
Setting this value only updates the values used in version negotiation, and
does NOT impact the actual capabilities of the transport. It should only be
used for compatibility with servers having strict requirements around the
MCP-Protocol-Version header.
supportedProtocolVersions - protocol versions supported by this transportpublic WebRxStreamableHttpTransport build()
WebRxStreamableHttpTransport using
the current builder configuration.WebRxStreamableHttpTransport