org.apache.calcite.avatica.remote

## Interface ProtobufTranslation

All Known Implementing Classes:
  ProtobufTranslationImpl

    public interface ProtobufTranslation

Generic interface to support parsing of serialized protocol buffers between client and server.

### Method Summary

Methods
`Service.Request` `parseRequest(byte[] bytes)` Parses a serialized protocol buffer request into a `Service.Request`.
`Service.Response` `parseResponse(byte[] bytes)` Parses a serialized protocol buffer response into a `Service.Response`.
`byte[]` `serializeRequest(Service.Request request)` Serializes a `Service.Request` as a protocol buffer.
`byte[]` `serializeResponse(Service.Response response)` Serializes a `Service.Response` as a protocol buffer.

### Method Detail

#### serializeResponse

    byte[] serializeResponse(Service.Response response)
                             throws IOException

Serializes a `Service.Response` as a protocol buffer.

Parameters:
  `response` - The response to serialize
Throws:
  `IOException` - If there are errors during serialization

#### serializeRequest

    byte[] serializeRequest(Service.Request request)
                            throws IOException

Serializes a `Service.Request` as a protocol buffer.

Parameters:
  `request` - The request to serialize
Throws:
  `IOException` - If there are errors during serialization

#### parseRequest

    Service.Request parseRequest(byte[] bytes)
                                 throws IOException

Parses a serialized protocol buffer request into a `Service.Request`.

Parameters:
  `bytes` - Serialized protocol buffer request from client
Returns:
  A Request object for the given bytes
Throws:
  `IOException` - If the protocol buffer cannot be deserialized

#### parseResponse

    Service.Response parseResponse(byte[] bytes)
                                   throws IOException

Parses a serialized protocol buffer response into a `Service.Response`.

Parameters:
  `bytes` - Serialized protocol buffer request from server
Returns:
  The Response object for the given bytes
Throws:
  `IOException` - If the protocol buffer cannot be deserialized