Class DefaultMcpTransportStream<CONNECTION>

java.lang.Object
io.modelcontextprotocol.spec.DefaultMcpTransportStream<CONNECTION>
Type Parameters:
CONNECTION - the resource serving the stream
All Implemented Interfaces:
McpTransportStream<CONNECTION>

public class DefaultMcpTransportStream<CONNECTION> extends Object implements McpTransportStream<CONNECTION>
An implementation of McpTransportStream using Project Reactor types.
Author:
Dariusz Jędrzejczyk
  • Constructor Details

    • DefaultMcpTransportStream

      public DefaultMcpTransportStream(boolean resumable, Function<McpTransportStream<CONNECTION>,org.reactivestreams.Publisher<CONNECTION>> reconnect)
      Constructs a new instance representing a particular stream that can resume using the provided reconnect mechanism.
      Parameters:
      resumable - whether the stream is resumable and should try to reconnect
      reconnect - the mechanism to use in case an error is observed on the current event stream to asynchronously kick off a resumed stream consumption, potentially using the stored lastId().
  • Method Details