Class WebRxSseServerTransportProvider.Builder
java.lang.Object
io.modelcontextprotocol.server.transport.WebRxSseServerTransportProvider.Builder
- Enclosing class:
- WebRxSseServerTransportProvider
Builder for creating instances of
WebRxSseServerTransportProvider.
This builder provides a fluent API for configuring and creating instances of WebFluxSseServerTransportProvider with custom settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance ofWebRxSseServerTransportProviderwith the configured settings.messageEndpoint(String messageEndpoint) Sets the endpoint URI where clients should send their JSON-RPC messages.objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Sets the ObjectMapper to use for JSON serialization/deserialization of MCP messages.sseEndpoint(String sseEndpoint) Sets the SSE endpoint path.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
objectMapper
public WebRxSseServerTransportProvider.Builder objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Sets the ObjectMapper to use for JSON serialization/deserialization of MCP messages.- Parameters:
objectMapper- The ObjectMapper instance. Must not be null.- Returns:
- this builder instance
- Throws:
IllegalArgumentException- if objectMapper is null
-
messageEndpoint
Sets the endpoint URI where clients should send their JSON-RPC messages.- Parameters:
messageEndpoint- The message endpoint URI. Must not be null.- Returns:
- this builder instance
- Throws:
IllegalArgumentException- if messageEndpoint is null
-
sseEndpoint
Sets the SSE endpoint path.- Parameters:
sseEndpoint- The SSE endpoint path. Must not be null.- Returns:
- this builder instance
- Throws:
IllegalArgumentException- if sseEndpoint is null
-
build
Builds a new instance ofWebRxSseServerTransportProviderwith the configured settings.- Returns:
- A new WebFluxSseServerTransportProvider instance
- Throws:
IllegalStateException- if required parameters are not set
-