Package io.grpc
Interface MethodDescriptor.PrototypeMarshaller<T>
- All Superinterfaces:
MethodDescriptor.Marshaller<T>,MethodDescriptor.ReflectableMarshaller<T>
- Enclosing class:
- MethodDescriptor<ReqT,
RespT>
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
public static interface MethodDescriptor.PrototypeMarshaller<T>
extends MethodDescriptor.ReflectableMarshaller<T>
A marshaller that uses a fixed instance of the type it produces.
- Since:
- 1.1.0
-
Method Summary
Modifier and TypeMethodDescriptionAn instance of the expected message type, typically used as a schema and helper for producing other message instances.Methods inherited from interface io.grpc.MethodDescriptor.Marshaller
parse, streamMethods inherited from interface io.grpc.MethodDescriptor.ReflectableMarshaller
getMessageClass
-
Method Details
-
getMessagePrototype
An instance of the expected message type, typically used as a schema and helper for producing other message instances. Thenullvalue may be a special value for the marshaller (like the equivalent ofVoid), so it is a valid return value.nulldoes not mean "unsupported" or "unknown".It is generally expected this would return the same instance each invocation, but it is not a requirement.
-