Package io.servicetalk.grpc.api
Interface GrpcSerializationProvider
-
public interface GrpcSerializationProvider
A 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()
SupportedContentCodec
s for thisGrpcSerializationProvider
.
-
-
-
Method Detail
-
supportedMessageCodings
java.util.List<ContentCodec> supportedMessageCodings()
SupportedContentCodec
s for thisGrpcSerializationProvider
. Content codings will be used to encoded and decode gRPC messages according to configuration of client and server.- Returns:
- supported
ContentCodec
s 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
-ContentCodec
for the serializer.type
- TheClass
type that the returnedHttpSerializer
can serialize.- Returns:
- a
HttpSerializer
for aClass
of typeGrpcSerializationProvider
.
-
deserializerFor
<T> HttpDeserializer<T> deserializerFor(ContentCodec coding, java.lang.Class<T> type)
- Type Parameters:
T
- The type of object to deserialize.- Parameters:
coding
-ContentCodec
for the deserializer.type
- TheClass
type that the return value will deserialize.- Returns:
- a
HttpDeserializer
for aClass
of typeGrpcSerializationProvider
.
-
-