Class ProtobufService
java.lang.Object
org.apache.calcite.avatica.remote.AbstractService
org.apache.calcite.avatica.remote.ProtobufService
- All Implemented Interfaces:
Service
- Direct Known Subclasses:
LocalProtobufService,MockProtobufService,RemoteProtobufService
Service implementation that encodes requests and responses as protocol buffers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.avatica.remote.Service
Service.Base, Service.CatalogsRequest, Service.CloseConnectionRequest, Service.CloseConnectionResponse, Service.CloseStatementRequest, Service.CloseStatementResponse, Service.ColumnsRequest, Service.CommitRequest, Service.CommitResponse, Service.ConnectionSyncRequest, Service.ConnectionSyncResponse, Service.CreateStatementRequest, Service.CreateStatementResponse, Service.DatabasePropertyRequest, Service.DatabasePropertyResponse, Service.ErrorResponse, Service.ExecuteBatchRequest, Service.ExecuteBatchResponse, Service.ExecuteRequest, Service.ExecuteResponse, Service.Factory, Service.FetchRequest, Service.FetchResponse, Service.OpenConnectionRequest, Service.OpenConnectionResponse, Service.PrepareAndExecuteBatchRequest, Service.PrepareAndExecuteRequest, Service.PrepareRequest, Service.PrepareResponse, Service.Request, Service.Response, Service.ResultSetResponse, Service.RollbackRequest, Service.RollbackResponse, Service.RpcMetadataResponse, Service.SchemasRequest, Service.SyncResultsRequest, Service.SyncResultsResponse, Service.TablesRequest, Service.TableTypesRequest, Service.TypeInfoRequest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Service.Response_apply(Service.Request request) Derived class should implement this method to transport requests and responses to and from the peer service.apply(Service.CatalogsRequest request) apply(Service.CloseConnectionRequest request) apply(Service.CloseStatementRequest request) apply(Service.ColumnsRequest request) apply(Service.CommitRequest request) apply(Service.ConnectionSyncRequest request) apply(Service.CreateStatementRequest request) apply(Service.DatabasePropertyRequest request) apply(Service.ExecuteBatchRequest request) apply(Service.ExecuteRequest request) apply(Service.FetchRequest request) apply(Service.OpenConnectionRequest request) apply(Service.PrepareAndExecuteRequest request) apply(Service.PrepareRequest request) apply(Service.RollbackRequest request) apply(Service.SchemasRequest request) apply(Service.SyncResultsRequest request) apply(Service.TablesRequest request) apply(Service.TableTypesRequest request) apply(Service.TypeInfoRequest request) static <T extends com.google.protobuf.Message>
TcastProtobufMessage(com.google.protobuf.Message msg, Class<T> expectedType) Checks if the providedMessageis an instance of the Class given byexpectedType.Methods inherited from class org.apache.calcite.avatica.remote.AbstractService
setRpcMetadata
-
Constructor Details
-
ProtobufService
public ProtobufService()
-
-
Method Details
-
_apply
Derived class should implement this method to transport requests and responses to and from the peer service. -
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
apply
-
castProtobufMessage
public static <T extends com.google.protobuf.Message> T castProtobufMessage(com.google.protobuf.Message msg, Class<T> expectedType) Checks if the providedMessageis an instance of the Class given byexpectedType. Throws an IllegalArgumentException if the message is not of the expected type, otherwise, it returns the message cast as the expected type.- Parameters:
msg- A Protocol Buffer message.expectedType- The expected type of the Protocol Buffer message.- Returns:
- The msg cast to the concrete Message type.
- Throws:
IllegalArgumentException- If the type of the message is not the expectedType.
-