public class ProtobufHandler extends AbstractHandler<byte[]>
Service
 by converting them to the POJO Request. Returns back the serialized protocol
 buffer response.Handler.HandlerResponse<T>serviceHANDLER_SERIALIZATION_METRICS_NAME, HTTP_BAD_REQUEST, HTTP_INTERNAL_SERVER_ERROR, HTTP_OK, HTTP_UNAUTHENTICATED, HTTP_UNAUTHORIZED| Constructor and Description | 
|---|
| ProtobufHandler(Service service,
               ProtobufTranslation translation,
               MetricsSystem metrics) | 
| Modifier and Type | Method and Description | 
|---|---|
| Handler.HandlerResponse<byte[]> | apply(byte[] requestBytes)Compute a response for the given request, handling errors generated by that computation. | 
badRequestErrorResponse, convertToErrorResponse, setRpcMetadata, unauthenticatedErrorResponse, unauthorizedErrorResponsepublic ProtobufHandler(Service service, ProtobufTranslation translation, MetricsSystem metrics)
public Handler.HandlerResponse<byte[]> apply(byte[] requestBytes)
AbstractHandlerapply in interface Handler<byte[]>apply in class AbstractHandler<byte[]>requestBytes - The caller's request.Service.Response with additional context about that response.Copyright © 2012-2025 Apache Software Foundation. All Rights Reserved.