Class AbstractHttpClientTransport

java.lang.Object
com.mulesoft.connectors.mcp.internal.client.connection.transport.AbstractHttpClientTransport
All Implemented Interfaces:
io.modelcontextprotocol.spec.McpClientTransport, io.modelcontextprotocol.spec.McpTransport
Direct Known Subclasses:
SseClientTransport, StreamableHttpClientTransport

public abstract class AbstractHttpClientTransport extends Object implements io.modelcontextprotocol.spec.McpClientTransport
Base class for McpClientTransport implementations based on Http
Since:
0.2.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.mule.extension.http.api.request.authentication.HttpRequestAuthentication
     
    protected final org.mule.runtime.http.api.client.HttpClient
     
    protected final MessagingManager
     
    protected final com.fasterxml.jackson.databind.ObjectMapper
     
    protected final AtomicBoolean
     
    protected final org.mule.runtime.http.api.client.HttpRequestOptions
     
    protected final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractHttpClientTransport(org.mule.runtime.http.api.client.HttpClient httpClient, String serverUrl, int responseTimeout, org.mule.extension.http.api.request.authentication.HttpRequestAuthentication authentication, MessagingManager messagingManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    unmarshalFrom(Object data, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.modelcontextprotocol.spec.McpClientTransport

    connect

    Methods inherited from interface io.modelcontextprotocol.spec.McpTransport

    close, closeGracefully, sendMessage
  • Field Details

    • serverUrl

      protected final String serverUrl
    • authentication

      protected final org.mule.extension.http.api.request.authentication.HttpRequestAuthentication authentication
    • requestOptions

      protected final org.mule.runtime.http.api.client.HttpRequestOptions requestOptions
    • messagingManager

      protected final MessagingManager messagingManager
    • opened

      protected final AtomicBoolean opened
    • objectMapper

      protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • httpClient

      protected final org.mule.runtime.http.api.client.HttpClient httpClient
  • Constructor Details

    • AbstractHttpClientTransport

      public AbstractHttpClientTransport(org.mule.runtime.http.api.client.HttpClient httpClient, String serverUrl, int responseTimeout, org.mule.extension.http.api.request.authentication.HttpRequestAuthentication authentication, MessagingManager messagingManager)
  • Method Details

    • unmarshalFrom

      public <T> T unmarshalFrom(Object data, com.fasterxml.jackson.core.type.TypeReference<T> typeRef)
      Specified by:
      unmarshalFrom in interface io.modelcontextprotocol.spec.McpTransport