Package io.grpc.stub.annotations
Annotation Type RpcMethod
- 
 @Retention(CLASS) @Target(METHOD) public @interface RpcMethod RpcMethodcontains a limited subset of information about the RPC to assist Java Annotation Processors.This annotation is used by the gRPC stub compiler to annotate MethodDescriptorgetters. Users should not annotate their own classes with this annotation. Not all stubs may have this annotation, so consumers should not assume that it is present.- Since:
- 1.14.0
 
- 
- 
Required Element SummaryRequired Elements Modifier and Type Required Element Description StringfullMethodNameThe fully qualified method name.MethodDescriptor.MethodTypemethodTypeThe call type of the method.Class<?>requestTypeThe request type of the method.Class<?>responseTypeThe response type of the method.
 
- 
- 
- 
Element Detail- 
fullMethodNameString fullMethodName The fully qualified method name. This should match the name as returned byMethodDescriptor.generateFullMethodName(String, String).
 
- 
 - 
- 
requestTypeClass<?> requestType The request type of the method. The request type class should be assignable from (i.e.Class.isAssignableFrom(Class)the request typeReqTof theMethodDescriptor. Additionally, if the requestMethodDescriptor.Marshalleris aMethodDescriptor.ReflectableMarshaller, the request type should be assignable fromMethodDescriptor.ReflectableMarshaller#getMessageClass().
 
- 
 - 
- 
responseTypeClass<?> responseType The response type of the method. The response type class should be assignable from (i.e.Class.isAssignableFrom(Class)the response typeRespTof theMethodDescriptor. Additionally, if the responseMethodDescriptor.Marshalleris aMethodDescriptor.ReflectableMarshaller, the response type should be assignable fromMethodDescriptor.ReflectableMarshaller#getMessageClass().
 
- 
 - 
- 
methodTypeMethodDescriptor.MethodType methodType The call type of the method.
 
- 
 
-