Module io.inverno.mod.grpc.base
Package io.inverno.mod.grpc.base
Interface GrpcMessageCompressorService
public interface GrpcMessageCompressorService
A message compressor service allows to resolve gRPC message compressors from message encodings.
This service shall concentrate all GrpcMessageCompressor
instances injected in the module. A client or a server relies on this service to determine which compressor must be used to compress
or uncompress messages based on GrpcHeaders.NAME_GRPC_ACCEPT_MESSAGE_ENCODING
or GrpcHeaders.NAME_GRPC_MESSAGE_ENCODING
headers.
- Since:
- 1.9
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiongetMessageCompressor
(String... messageEncodings) Returns the first available gRPC message compressor matching the specified list of message encodings.Returns the list of supported message encodings.
-
Method Details
-
getMessageCompressor
Returns the first available gRPC message compressor matching the specified list of message encodings.
- Parameters:
messageEncodings
- a list of message encodings by order of preference- Returns:
- an optional returning the message compressor or an empty optional if no compressor was found or the specified list of encodings was null or empty
-
getMessageEncodings
Returns the list of supported message encodings.
- Returns:
- a list of message encodings
-