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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getMessagePrototype()
An 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, stream
-
Methods inherited from interface io.grpc.MethodDescriptor.ReflectableMarshaller
getMessageClass
-
-
-
-
Method Detail
-
getMessagePrototype
@Nullable T getMessagePrototype()
An instance of the expected message type, typically used as a schema and helper for producing other message instances. Thenull
value may be a special value for the marshaller (like the equivalent ofVoid
), so it is a valid return value.null
does not mean "unsupported" or "unknown".It is generally expected this would return the same instance each invocation, but it is not a requirement.
-
-