Class McpServerConnectionProvider

java.lang.Object
com.mulesoft.connectors.mcp.internal.server.connection.provider.McpServerConnectionProvider
All Implemented Interfaces:
org.mule.runtime.api.connection.CachedConnectionProvider<io.modelcontextprotocol.server.McpAsyncServer>, org.mule.runtime.api.connection.ConnectionProvider<io.modelcontextprotocol.server.McpAsyncServer>, org.mule.runtime.api.lifecycle.Stoppable
Direct Known Subclasses:
SSEServerConnectionProvider, StreamableHttpServerConnectionProvider

public abstract class McpServerConnectionProvider extends Object implements org.mule.runtime.api.connection.CachedConnectionProvider<io.modelcontextprotocol.server.McpAsyncServer>, org.mule.runtime.api.lifecycle.Stoppable
Base class for s server connection provider
Since:
0.1.0
  • Field Details

    • configName

      @RefName protected String configName
    • configTracker

      @Inject protected ConfigTracker configTracker
  • Constructor Details

    • McpServerConnectionProvider

      public McpServerConnectionProvider()
  • Method Details

    • getScheduler

      protected org.mule.runtime.api.scheduler.Scheduler getScheduler()
    • stop

      public final void stop() throws org.mule.runtime.api.exception.MuleException
      Specified by:
      stop in interface org.mule.runtime.api.lifecycle.Stoppable
      Throws:
      org.mule.runtime.api.exception.MuleException
    • doStop

      protected void doStop() throws org.mule.runtime.api.exception.MuleException
      Throws:
      org.mule.runtime.api.exception.MuleException
    • connect

      public final io.modelcontextprotocol.server.McpAsyncServer connect() throws org.mule.runtime.api.connection.ConnectionException
      Specified by:
      connect in interface org.mule.runtime.api.connection.ConnectionProvider<io.modelcontextprotocol.server.McpAsyncServer>
      Throws:
      org.mule.runtime.api.connection.ConnectionException
    • disconnect

      public final void disconnect(io.modelcontextprotocol.server.McpAsyncServer server)
      Specified by:
      disconnect in interface org.mule.runtime.api.connection.ConnectionProvider<io.modelcontextprotocol.server.McpAsyncServer>
    • createTransportProvider

      protected abstract BaseServerTransportProvider createTransportProvider() throws org.mule.runtime.api.connection.ConnectionException
      Throws:
      org.mule.runtime.api.connection.ConnectionException