Class SqlDataServiceGrpc.SqlDataServiceStub (0.1.0)
public static final class SqlDataServiceGrpc.SqlDataServiceStub extends AbstractAsyncStub<SqlDataServiceGrpc.SqlDataServiceStub>
A stub to allow clients to do asynchronous rpc calls to service SqlDataService.
Service for streaming data to and from Cloud SQL instances.
Inheritance
java.lang.Object >
io.grpc.stub.AbstractStub >
io.grpc.stub.AbstractAsyncStub >
SqlDataServiceGrpc.SqlDataServiceStub
Inherited Members
io.grpc.stub.AbstractAsyncStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel)
io.grpc.stub.AbstractAsyncStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.<T>withOption(io.grpc.CallOptions.Key<T>,T)
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.getCallOptions()
io.grpc.stub.AbstractStub.getChannel()
io.grpc.stub.AbstractStub.withCallCredentials(io.grpc.CallCredentials)
io.grpc.stub.AbstractStub.withChannel(io.grpc.Channel)
io.grpc.stub.AbstractStub.withCompression(java.lang.String)
io.grpc.stub.AbstractStub.withDeadline(io.grpc.Deadline)
io.grpc.stub.AbstractStub.withDeadlineAfter(java.time.Duration)
io.grpc.stub.AbstractStub.withDeadlineAfter(long,java.util.concurrent.TimeUnit)
io.grpc.stub.AbstractStub.withExecutor(java.util.concurrent.Executor)
io.grpc.stub.AbstractStub.withInterceptors(io.grpc.ClientInterceptor...)
io.grpc.stub.AbstractStub.withMaxInboundMessageSize(int)
io.grpc.stub.AbstractStub.withMaxOutboundMessageSize(int)
io.grpc.stub.AbstractStub.withOnReadyThreshold(int)
io.grpc.stub.AbstractStub.withWaitForReady()
Methods
build(Channel channel, CallOptions callOptions)
protected SqlDataServiceGrpc.SqlDataServiceStub build(Channel channel, CallOptions callOptions)
| Parameters |
| Name |
Description |
channel |
io.grpc.Channel
|
callOptions |
io.grpc.CallOptions
|
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
streamSqlData(StreamObserver<StreamSqlDataResponse> responseObserver)
public StreamObserver<StreamSqlDataRequest> streamSqlData(StreamObserver<StreamSqlDataResponse> responseObserver)
StreamSqlData establishes a bidirectional stream to a Cloud SQL instance,
and then streams data to and from the instance.
The first message from the client MUST be a StreamSqlDataRequest request
with configuration settings, including required values for the
connection_settings field. Subsequent messages from the client may
contain the payload field.
Messages from the server may contain the payload field.
The payload fields of the request and response streams contain the raw
data of the database's native wire protocol (e.g., PostgreSQL wire
protocol). The database client is responsible for generating and parsing
this data.
Any errors on initial connection (e.g., connection failure, authorization
issues, network problems) will result in the stream being terminated with
an appropriate RPC status exception.
After a successful connection is made, if an error occurs, then the server
terminates connection and returns the appropriate RPC status exception.
Add the request params headers to the request to ensure that
the streaming request is routed to the correct service for your database.
Use this format for the request params header:
x-goog-request-params:
location_id={location_path}&instance_id={instance_path}
location_path is locations/{location_name}
instance_path is projects/{project_name}/instances/{instance_name}
for example:
x-goog-request-params:
location_id=locations/us-central1&instance_id=projects/myproject/instances/instancename`
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-08-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-05 UTC."],[],[]]