Package org.mcpjava.server.spi
Class McpServerSPILoader
java.lang.Object
org.mcpjava.server.spi.McpServerSPILoader
Provides access to the
McpServerSPI implementation.
Static constructor methods use getSPI() to obtain the McpServerSPI to create the
object.
Users should use static constructor methods, for example
TextContent.of(String), rather than this
interface.
-
Method Summary
Modifier and TypeMethodDescriptionstatic McpServerSPIgetSPI()ReturnsMcpServerSPI, loading it if necessary.
-
Method Details
-
getSPI
ReturnsMcpServerSPI, loading it if necessary.The implementation is loaded using Java's
ServiceLoadermechanism and the classloader ofMcpServerSPI.- Returns:
- the McpServerSPI instance
- Throws:
IllegalStateException- if no SPI implementation is found
-