Package com.google.genai.types
Class StreamableHttpTransport.Builder
-
- All Implemented Interfaces:
public abstract class StreamableHttpTransport.BuilderBuilder for StreamableHttpTransport.
-
-
Constructor Summary
Constructors Constructor Description StreamableHttpTransport.Builder()
-
Method Summary
Modifier and Type Method Description abstract StreamableHttpTransport.Builderheaders(Map<String, String> headers)Setter for headers. StreamableHttpTransport.BuilderclearHeaders()Clears the value of headers field. abstract StreamableHttpTransport.BuildersseReadTimeout(Duration sseReadTimeout)Setter for sseReadTimeout. StreamableHttpTransport.BuilderclearSseReadTimeout()Clears the value of sseReadTimeout field. abstract StreamableHttpTransport.BuilderterminateOnClose(boolean terminateOnClose)Setter for terminateOnClose. StreamableHttpTransport.BuilderclearTerminateOnClose()Clears the value of terminateOnClose field. abstract StreamableHttpTransport.Buildertimeout(Duration timeout)Setter for timeout. StreamableHttpTransport.BuilderclearTimeout()Clears the value of timeout field. abstract StreamableHttpTransport.Builderurl(String url)Setter for url. StreamableHttpTransport.BuilderclearUrl()Clears the value of url field. abstract StreamableHttpTransportbuild()-
-
Method Detail
-
headers
abstract StreamableHttpTransport.Builder headers(Map<String, String> headers)
Setter for headers.
headers: Optional: Fields for authentication headers, timeouts, etc., if needed.
-
clearHeaders
@CanIgnoreReturnValue() StreamableHttpTransport.Builder clearHeaders()
Clears the value of headers field.
-
sseReadTimeout
abstract StreamableHttpTransport.Builder sseReadTimeout(Duration sseReadTimeout)
Setter for sseReadTimeout.
sseReadTimeout: Timeout for SSE read operations.
-
clearSseReadTimeout
@CanIgnoreReturnValue() StreamableHttpTransport.Builder clearSseReadTimeout()
Clears the value of sseReadTimeout field.
-
terminateOnClose
abstract StreamableHttpTransport.Builder terminateOnClose(boolean terminateOnClose)
Setter for terminateOnClose.
terminateOnClose: Whether to close the client session when the transport closes.
-
clearTerminateOnClose
@CanIgnoreReturnValue() StreamableHttpTransport.Builder clearTerminateOnClose()
Clears the value of terminateOnClose field.
-
timeout
abstract StreamableHttpTransport.Builder timeout(Duration timeout)
Setter for timeout.
timeout: HTTP timeout for regular operations.
-
clearTimeout
@CanIgnoreReturnValue() StreamableHttpTransport.Builder clearTimeout()
Clears the value of timeout field.
-
url
abstract StreamableHttpTransport.Builder url(String url)
Setter for url.
url: The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp".
-
clearUrl
@CanIgnoreReturnValue() StreamableHttpTransport.Builder clearUrl()
Clears the value of url field.
-
build
abstract StreamableHttpTransport build()
-
-
-
-