Package io.servicetalk.grpc.api
Interface GrpcSerializationProvider
-
public interface GrpcSerializationProviderA provider for gRPC serialization/deserialization.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> HttpDeserializer<T>deserializerFor(ContentCodec coding, java.lang.Class<T> type)<T> HttpSerializer<T>serializerFor(ContentCodec coding, java.lang.Class<T> type)java.util.List<ContentCodec>supportedMessageCodings()SupportedContentCodecs for thisGrpcSerializationProvider.
-
-
-
Method Detail
-
supportedMessageCodings
java.util.List<ContentCodec> supportedMessageCodings()
SupportedContentCodecs for thisGrpcSerializationProvider. Content codings will be used to encoded and decode gRPC messages according to configuration of client and server.- Returns:
- supported
ContentCodecs for thisGrpcSerializationProvider
-
serializerFor
<T> HttpSerializer<T> serializerFor(ContentCodec coding, java.lang.Class<T> type)
- Type Parameters:
T- The type of object to serialize.- Parameters:
coding-ContentCodecfor the serializer.type- TheClasstype that the returnedHttpSerializercan serialize.- Returns:
- a
HttpSerializerfor aClassof typeGrpcSerializationProvider.
-
deserializerFor
<T> HttpDeserializer<T> deserializerFor(ContentCodec coding, java.lang.Class<T> type)
- Type Parameters:
T- The type of object to deserialize.- Parameters:
coding-ContentCodecfor the deserializer.type- TheClasstype that the return value will deserialize.- Returns:
- a
HttpDeserializerfor aClassof typeGrpcSerializationProvider.
-
-