Cloud Spanner Adapter API
The Cloud Spanner Adapter service allows native drivers of supported database
dialects to interact directly with Cloud Spanner by wrapping the underlying
wire protocol used by the driver in a gRPC stream.
Handles a single message from the client and returns the result as a
stream. The server will interpret the message frame and respond with
message frames to the client.
Creates a new session to be used for requests made by the adapter.
A session identifies a specific incarnation of a database resource and is
meant to be reused across many AdaptMessage calls.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [0.9.0 (latest)](/java/docs/reference/google-cloud-spanneradapter/latest/com.google.spanner.adapter.v1.AdapterGrpc.AsyncService)\n- [0.8.0](/java/docs/reference/google-cloud-spanneradapter/0.8.0/com.google.spanner.adapter.v1.AdapterGrpc.AsyncService)\n- [0.6.0](/java/docs/reference/google-cloud-spanneradapter/0.6.0/com.google.spanner.adapter.v1.AdapterGrpc.AsyncService)\n- [0.4.0](/java/docs/reference/google-cloud-spanneradapter/0.4.0/com.google.spanner.adapter.v1.AdapterGrpc.AsyncService)\n- [0.3.0](/java/docs/reference/google-cloud-spanneradapter/0.3.0/com.google.spanner.adapter.v1.AdapterGrpc.AsyncService) \n\n public static interface AdapterGrpc.AsyncService\n\nCloud Spanner Adapter API\nThe Cloud Spanner Adapter service allows native drivers of supported database\ndialects to interact directly with Cloud Spanner by wrapping the underlying\nwire protocol used by the driver in a gRPC stream.\n\nMethods\n\nadaptMessage(AdaptMessageRequest request, StreamObserver\\\u003cAdaptMessageResponse\\\u003e responseObserver) \n\n public default void adaptMessage(AdaptMessageRequest request, StreamObserver\u003cAdaptMessageResponse\u003e responseObserver)\n\nHandles a single message from the client and returns the result as a\nstream. The server will interpret the message frame and respond with\nmessage frames to the client.\n\n| **Parameters** ||\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Name** | **Description** |\n| `request` | [AdaptMessageRequest](/java/docs/reference/google-cloud-spanneradapter/latest/com.google.spanner.adapter.v1.AdaptMessageRequest) |\n| `responseObserver` | io.grpc.stub.StreamObserver`\u003c`[AdaptMessageResponse](/java/docs/reference/google-cloud-spanneradapter/latest/com.google.spanner.adapter.v1.AdaptMessageResponse)`\u003e` |\n\ncreateSession(CreateSessionRequest request, StreamObserver\\\u003cSession\\\u003e responseObserver) \n\n public default void createSession(CreateSessionRequest request, StreamObserver\u003cSession\u003e responseObserver)\n\nCreates a new session to be used for requests made by the adapter.\nA session identifies a specific incarnation of a database resource and is\nmeant to be reused across many `AdaptMessage` calls.\n\n| **Parameters** ||\n|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| **Name** | **Description** |\n| `request` | [CreateSessionRequest](/java/docs/reference/google-cloud-spanneradapter/latest/com.google.spanner.adapter.v1.CreateSessionRequest) |\n| `responseObserver` | io.grpc.stub.StreamObserver`\u003c`[Session](/java/docs/reference/google-cloud-spanneradapter/latest/com.google.spanner.adapter.v1.Session)`\u003e` |"]]