Class AbstractUnaryGrpcService

  • All Implemented Interfaces:
    com.linecorp.armeria.server.HttpService, com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,​com.linecorp.armeria.common.HttpResponse>

    public abstract class AbstractUnaryGrpcService
    extends AbstractUnsafeUnaryGrpcService
    An AbstractUnaryGrpcService can be used to implement a gRPC service without depending on gRPC stubs. This service takes care of deframing and framing with the gRPC wire format and handling appropriate headers.

    This service does not support compression. If you need support for compression, please consider using normal gRPC stubs or file a feature request.

    • Constructor Detail

      • AbstractUnaryGrpcService

        public AbstractUnaryGrpcService()
    • Method Detail

      • handleMessage

        protected abstract CompletableFuture<byte[]> handleMessage​(byte[] message)
        Returns an unframed response message to return to the client, given an unframed request message. It is expected that the implementation has the logic to know how to parse the request and serialize a response into byte[]. The returned byte[] will be framed and returned to the client.