registerMessageType(Class, Parser) is used to add one or more MessageLite message types. Resulting
GrpcSerializationProvider from build() will only serialize and deserialize those message types.@Deprecated
public final class ProtoBufSerializationProviderBuilder
extends Object
GrpcSerializationProvider that can serialize and deserialize
pre-registered protocol buffer objects.| Constructor and Description |
|---|
ProtoBufSerializationProviderBuilder()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
GrpcSerializationProvider |
build()
Deprecated.
Builds a new
GrpcSerializationProvider containing all the message types registered with this builder. |
<T extends MessageLite> |
registerMessageType(Class<T> messageType,
Parser<T> parser)
Deprecated.
Register the passed
messageType with the provided Parser. |
<T extends MessageLite> |
supportedMessageCodings(List<ContentCodec> supportedCodings)
Deprecated.
Set the supported message encodings for the serializers and deserializers.
|
public ProtoBufSerializationProviderBuilder()
public <T extends MessageLite> ProtoBufSerializationProviderBuilder supportedMessageCodings(List<ContentCodec> supportedCodings)
Identity.identity() is always supported regardless of the config passedT - Type of MessageLite to register.supportedCodings - the set of allowed encodingsthispublic <T extends MessageLite> ProtoBufSerializationProviderBuilder registerMessageType(Class<T> messageType, Parser<T> parser)
messageType with the provided Parser.T - Type of MessageLite to register.messageType - Class of the type of message to register.parser - Parser for this message type.thispublic GrpcSerializationProvider build()
GrpcSerializationProvider containing all the message types registered with this builder.GrpcSerializationProvider that will serialize and deserialize message types that were
registered to this builder.