Class ProtobufHandler
java.lang.Object
org.apache.calcite.avatica.remote.AbstractHandler<byte[]>
org.apache.calcite.avatica.remote.ProtobufHandler
- All Implemented Interfaces:
Handler<byte[]>
Dispatches serialized protocol buffer messages to the provided
Service
by converting them to the POJO Request. Returns back the serialized protocol
buffer response.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.avatica.remote.Handler
Handler.HandlerResponse<T> -
Field Summary
Fields inherited from class org.apache.calcite.avatica.remote.AbstractHandler
serviceFields inherited from interface org.apache.calcite.avatica.remote.Handler
HANDLER_SERIALIZATION_METRICS_NAME, HTTP_INTERNAL_SERVER_ERROR, HTTP_OK, HTTP_UNAUTHENTICATED, HTTP_UNAUTHORIZED -
Constructor Summary
ConstructorsConstructorDescriptionProtobufHandler(Service service, ProtobufTranslation translation, org.apache.calcite.avatica.metrics.MetricsSystem metrics) -
Method Summary
Modifier and TypeMethodDescriptionHandler.HandlerResponse<byte[]>apply(byte[] requestBytes) Compute a response for the given request, handling errors generated by that computation.Methods inherited from class org.apache.calcite.avatica.remote.AbstractHandler
convertToErrorResponse, setRpcMetadata, unauthenticatedErrorResponse, unauthorizedErrorResponse
-
Constructor Details
-
ProtobufHandler
public ProtobufHandler(Service service, ProtobufTranslation translation, org.apache.calcite.avatica.metrics.MetricsSystem metrics)
-
-
Method Details
-
apply
Description copied from class:AbstractHandlerCompute a response for the given request, handling errors generated by that computation.- Specified by:
applyin interfaceHandler<byte[]>- Overrides:
applyin classAbstractHandler<byte[]>- Parameters:
requestBytes- The caller's request.- Returns:
- A
Service.Responsewith additional context about that response.
-