@Retention(CLASS) @Target({TYPE})

public @interface GrpcClient

Marks an interface as a gRPC client that the build-time annotation processor wires up to a generated gRPC-Web implementation. Each abstract method must carry an Rpc annotation naming the gRPC method, and at most one non-callback parameter – the request message, a @ProtoMessage-annotated POJO. The final parameter is an OnComplete<Response<ResponseMessage>> callback.

The fully qualified service path defaults to <value()>/<methodName> – for example helloworld.Greeter/SayHello. Override per-method via Rpc.service() when the service path needs to differ from the interface-level default.

The processor emits a <SimpleName>Impl class in generated-sources and registers it with GrpcClients so the interface’s static T of(String baseUrl) factory can return an instance without the project source referencing the impl directly. Mirrors RestClient.

Methods

public abstract String value() default ""Fully qualified gRPC service path (without leading slash), e.g. helloworld.Greeter.

Method details

value

public abstract String value() default ""
Fully qualified gRPC service path (without leading slash), e.g. helloworld.Greeter. Combined with each method’s Rpc.value() to form the request URI segment /<service>/<method> appended to the baseUrl. Empty string means each method must specify the full service path via Rpc.service().