public interface ProtobufTranslation
Modifier and Type | Method and Description |
---|---|
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. |
byte[] serializeResponse(Service.Response response) throws IOException
Service.Response
as a protocol buffer.response
- The response to serializeIOException
- If there are errors during serializationbyte[] serializeRequest(Service.Request request) throws IOException
Service.Request
as a protocol buffer.request
- The request to serializeIOException
- If there are errors during serializationService.Request parseRequest(byte[] bytes) throws IOException
Service.Request
.bytes
- Serialized protocol buffer request from clientIOException
- If the protocol buffer cannot be deserializedService.Response parseResponse(byte[] bytes) throws IOException
Service.Response
.bytes
- Serialized protocol buffer request from serverIOException
- If the protocol buffer cannot be deserializedCopyright © 2012-2024 Apache Software Foundation. All Rights Reserved.