Interface SessionEvent
- All Known Implementing Classes:
SessionEvent.CancelEvent,SessionEvent.NotificationEvent,SessionEvent.OutboundRequestEvent,SessionEvent.RequestEvent,SessionEvent.ResponseEvent
@InternalApi
public sealed interface SessionEvent
permits SessionEvent.RequestEvent, SessionEvent.OutboundRequestEvent, SessionEvent.ResponseEvent, SessionEvent.CancelEvent, SessionEvent.NotificationEvent
A recorded session event — request, response, notification, or cancellation.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA cancellation request.static final recordA notification sent to or received from the client.static final recordAn outbound (server-to-client) request.static final recordAn inbound request from the client.static final recordA response sent to the client. -
Method Summary
Modifier and TypeMethodDescriptionThe session this event belongs to.default longSSE event ID (for replay), or -1 if not assigned.default @Nullable StringIdentifies the SSE stream the event was delivered on: a POST-SSE stream's key, ornullfor the session's general-purpose GET stream.longTimestamp 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
Identifies the SSE stream the event was delivered on: a POST-SSE stream's key, ornullfor 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.
-