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.
  • Constructor Details

    • ProtobufHandler

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

    • 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.