Annotation Type 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.
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueFully qualified gRPC service path (without leading slash), e.g.helloworld.Greeter. Combined with each method'sRpc.value()to form the request URI segment/<service>/<method>appended to thebaseUrl. Empty string means each method must specify the full service path viaRpc.service().- Default:
""
-