StreamableHTTPServerTransportOptions class
Configuration options for StreamableHTTPServerTransport
Constructors
- StreamableHTTPServerTransportOptions.new({String? sessionIdGenerator()?, void onsessioninitialized(String sessionId)?, bool enableJsonResponse = false, EventStore? eventStore})
- Creates configuration options for StreamableHTTPServerTransport
Properties
- enableJsonResponse → bool
-
If true, the server will return JSON responses instead of starting an SSE stream.
This can be useful for simple request/response scenarios without streaming.
Default is false (SSE streams are preferred).
final
- eventStore → EventStore?
-
Event store for resumability support
If provided, resumability will be enabled, allowing clients to reconnect and resume messages
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onsessioninitialized → void Function(String sessionId)?
-
A callback for session initialization events
This is called when the server initializes a new session.
Useful in cases when you need to register multiple MCP sessions
and need to keep track of them.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionIdGenerator → String? Function()?
-
Function that generates a session ID for the transport.
The session ID SHOULD be globally unique and cryptographically secure (e.g., a securely generated UUID, a JWT, or a cryptographic hash)
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited