WithGrpcMarshaller
Available in a dev version: 0․11․0-grpc-186
How to configure
Specifies a custom GrpcMarshaller for encoding and decoding a message type in gRPC communication.
If a gRPC service uses a message type annotated with this annotation, the generated gRPC stubs will use the specified marshaller to encode and decode instances of that type.
The GrpcMarshaller for a type annotated with WithGrpcMarshaller can be retrieved using the marshaller function.
Example:
@WithGrpcMarshaller(ChatEntryMarshaller::class)
class ChatEntry(...)
object ChatEntryMarshaller : GrpcMarshaller<ChatEntry> { ... }
val marshaller = grpcMarshallerOf<ChatEntry>()Note: The referenced GrpcMarshaller must be an object.
See also
Specifies a custom GrpcMarshaller for encoding and decoding a message type in gRPC communication.
If a gRPC service uses a message type annotated with this annotation, the generated gRPC stubs will use the specified marshaller to encode and decode instances of that type.
The GrpcMarshaller for a type annotated with WithGrpcMarshaller can be retrieved using the marshaller function.
Example:
@WithGrpcMarshaller(ChatEntryMarshaller::class)
class ChatEntry(...)
object ChatEntryMarshaller : GrpcMarshaller<ChatEntry> { ... }
val marshaller = grpcMarshallerOf<ChatEntry>()Note: The referenced GrpcMarshaller must be an object.
See also
Specifies a custom GrpcMarshaller for encoding and decoding a message type in gRPC communication.
If a gRPC service uses a message type annotated with this annotation, the generated gRPC stubs will use the specified marshaller to encode and decode instances of that type.
The GrpcMarshaller for a type annotated with WithGrpcMarshaller can be retrieved using the marshaller function.
Example:
@WithGrpcMarshaller(ChatEntryMarshaller::class)
class ChatEntry(...)
object ChatEntryMarshaller : GrpcMarshaller<ChatEntry> { ... }
val marshaller = grpcMarshallerOf<ChatEntry>()Note: The referenced GrpcMarshaller must be an object.
See also
Properties
The GrpcMarshaller object responsible for encoding and decoding instances of the annotated type.
The GrpcMarshaller object responsible for encoding and decoding instances of the annotated type.
The GrpcMarshaller object responsible for encoding and decoding instances of the annotated type.