Class ProtoBufSerializationProviderBuilder

java.lang.Object
io.servicetalk.grpc.protobuf.ProtoBufSerializationProviderBuilder

@Deprecated public final class ProtoBufSerializationProviderBuilder extends Object
Deprecated.
The gRPC framing is now built into grpc-netty. This class is no longer necessary and will be removed in a future release. 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.
A builder for building a GrpcSerializationProvider that can serialize and deserialize pre-registered protocol buffer objects.
  • Constructor Details

    • ProtoBufSerializationProviderBuilder

      public ProtoBufSerializationProviderBuilder()
      Deprecated.
  • Method Details

    • supportedMessageCodings

      public <T extends com.google.protobuf.MessageLite> ProtoBufSerializationProviderBuilder supportedMessageCodings(List<ContentCodec> supportedCodings)
      Deprecated.
      Set the supported message encodings for the serializers and deserializers. The encodings will be advertised on the endpoint's headers and also used to validate each encoded message Identity.identity() is always supported regardless of the config passed
      Type Parameters:
      T - Type of MessageLite to register.
      Parameters:
      supportedCodings - the set of allowed encodings
      Returns:
      this
    • registerMessageType

      public <T extends com.google.protobuf.MessageLite> ProtoBufSerializationProviderBuilder registerMessageType(Class<T> messageType, com.google.protobuf.Parser<T> parser)
      Deprecated.
      Register the passed messageType with the provided Parser.
      Type Parameters:
      T - Type of MessageLite to register.
      Parameters:
      messageType - Class of the type of message to register.
      parser - Parser for this message type.
      Returns:
      this
    • build

      public GrpcSerializationProvider build()
      Deprecated.
      Builds a new GrpcSerializationProvider containing all the message types registered with this builder.
      Returns:
      New GrpcSerializationProvider that will serialize and deserialize message types that were registered to this builder.