org.apache.calcite.avatica.remote

## Class ProtobufHandler

- java.lang.Object
- - org.apache.calcite.avatica.remote.AbstractHandler<byte[]>
  - - org.apache.calcite.avatica.remote.ProtobufHandler

All Implemented Interfaces:
  Handler<byte[]>

    public class ProtobufHandler
    extends AbstractHandler<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

`service`

### Fields inherited from interface org.apache.calcite.avatica.remote.Handler

`HANDLER_SERIALIZATION_METRICS_NAME, HTTP_BAD_REQUEST, HTTP_INTERNAL_SERVER_ERROR, HTTP_OK, HTTP_UNAUTHENTICATED, HTTP_UNAUTHORIZED`

### Constructor Summary

Constructors
Constructor and Description
`ProtobufHandler(Service service, ProtobufTranslation translation, org.apache.calcite.avatica.metrics.MetricsSystem metrics)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Handler.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

`badRequestErrorResponse, convertToErrorResponse, setRpcMetadata, unauthenticatedErrorResponse, unauthorizedErrorResponse`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ProtobufHandler

    public ProtobufHandler(Service service,
                           ProtobufTranslation translation,
                           org.apache.calcite.avatica.metrics.MetricsSystem metrics)

### Method Detail

#### apply

    public Handler.HandlerResponse<byte[]> apply(byte[] requestBytes)

Description copied from class: `AbstractHandler`
Compute a response for the given request, handling errors generated by that computation.

Specified by:
  `apply` in interface `Handler<byte[]>`
Overrides:
  `apply` in class `AbstractHandler<byte[]>`
Parameters:
  `requestBytes` - The caller's request.
Returns:
  A `Service.Response` with additional context about that response.