Interface SessionEvent

All Known Implementing Classes:
SessionEvent.CancelEvent, SessionEvent.NotificationEvent, SessionEvent.OutboundRequestEvent, SessionEvent.RequestEvent, SessionEvent.ResponseEvent

A recorded session event — request, response, notification, or cancellation.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A cancellation request.
    static final record 
    A notification sent to or received from the client.
    static final record 
    An outbound (server-to-client) request.
    static final record 
    An inbound request from the client.
    static final record 
    A response sent to the client.
  • Method Summary

    Modifier and Type
    Method
    Description
    The session this event belongs to.
    default long
    SSE event ID (for replay), or -1 if not assigned.
    default @Nullable String
    Identifies the SSE stream the event was delivered on: a POST-SSE stream's key, or null for the session's general-purpose GET stream.
    long
    Timestamp of the event (epoch millis).
  • Method Details

    • sessionId

      String sessionId()
      The session this event belongs to.
    • timestamp

      long timestamp()
      Timestamp of the event (epoch millis).
    • sseEventId

      default long sseEventId()
      SSE event ID (for replay), or -1 if not assigned.
    • streamKey

      default @Nullable String streamKey()
      Identifies the SSE stream the event was delivered on: a POST-SSE stream's key, or null for the session's general-purpose GET stream. Replay after reconnection is per-stream (MCP Streamable HTTP: the server MUST NOT replay messages that would have been sent on a different stream), so each outbound event records its originating stream.