EU Parliament Monitor — API Documentation - v0.9.24
    Preparing search index...

    Adapter passed by MCPConnection to reconnect/retry helpers. Exposes the handful of connection fields these helpers need through getter/setter callbacks so the fields remain on the connection class (preserving external observability via getConnectionHealth()).

    interface ReconnectOps {
        maxConnectionAttempts: number;
        connectionRetryDelay: number;
        serverLabel: string;
        callTool: (name: string, args: object) => Promise<MCPToolResult>;
        isConnected: () => boolean;
        connect: () => Promise<void>;
        setConnected: (v: boolean) => void;
        getReconnectCount: () => number;
        setReconnectCount: (n: number) => void;
        getReconnectingPromise: () => Promise<void> | null;
        setReconnectingPromise: (p: Promise<void> | null) => void;
        getTimeoutCount: () => number;
        setTimeoutCount: (n: number) => void;
    }
    Index

    Properties

    maxConnectionAttempts: number

    Maximum consecutive connection attempts before giving up

    connectionRetryDelay: number

    Base delay (ms) between retry attempts

    serverLabel: string

    Human-readable label for log messages

    callTool: (name: string, args: object) => Promise<MCPToolResult>

    Call the underlying MCP tool (used by the retry loop)

    isConnected: () => boolean

    Whether the transport is currently connected

    connect: () => Promise<void>

    Trigger a full reconnect cycle

    setConnected: (v: boolean) => void

    Mark the transport as (dis)connected

    getReconnectCount: () => number

    Current reconnect-attempt counter

    setReconnectCount: (n: number) => void

    Update the reconnect-attempt counter

    getReconnectingPromise: () => Promise<void> | null

    Current in-flight reconnect promise (or null)

    setReconnectingPromise: (p: Promise<void> | null) => void

    Persist or clear the in-flight reconnect promise

    getTimeoutCount: () => number

    Current cumulative timeout counter

    setTimeoutCount: (n: number) => void

    Update the cumulative timeout counter