Package com.google.genai.types
Class StreamableHttpTransport
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.StreamableHttpTransport
A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not
supported in Vertex AI.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for StreamableHttpTransport. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiates a builder for StreamableHttpTransport.static StreamableHttpTransportDeserializes a JSON string to a StreamableHttpTransport object.headers()Optional: Fields for authentication headers, timeouts, etc., if needed.Timeout for SSE read operations.Whether to close the client session when the transport closes.timeout()HTTP timeout for regular operations.abstract StreamableHttpTransport.BuilderCreates a builder with the same values as this instance.url()The full URL for the MCPServer endpoint.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
StreamableHttpTransport
public StreamableHttpTransport()
-
-
Method Details
-
headers
Optional: Fields for authentication headers, timeouts, etc., if needed. -
sseReadTimeout
Timeout for SSE read operations. -
terminateOnClose
Whether to close the client session when the transport closes. -
timeout
HTTP timeout for regular operations. -
url
The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp". -
builder
Instantiates a builder for StreamableHttpTransport. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a StreamableHttpTransport object.
-