Annotation Interface Grpc.GrpcService
- Enclosing interface:
Grpc
@Target({TYPE,FIELD,CONSTRUCTOR})
@Retention(RUNTIME)
@Inherited
@Documented
public static @interface Grpc.GrpcService
An annotation used to mark a class as representing a gRPC service.
The value is the gRPC service name used on the wire. If the proto file declares
a package, use the fully-qualified service name, such as
example.greeter.GreetingService. Server descriptors use the service
class simple name when the value is not set. Declarative gRPC endpoints require
an explicit fully-qualified service name that matches the proto descriptor.
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueObtain the service name.Server descriptors use the service class simple name when the value is not set. Declarative gRPC endpoints require an explicit fully-qualified service name.
- Returns:
- the service name
- Default:
""
-
version
int versionObtain the service version.- Returns:
- the service version
- Default:
0
-