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
    Modifier and Type
    Optional Element
    Description
    Obtain the service name.
    int
    Obtain the service version.
  • Element Details

    • value

      String value
      Obtain 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 version
      Obtain the service version.
      Returns:
      the service version
      Default:
      0