@Retention(CLASS) @Target({METHOD})
public @interface Rpc
Binds a GrpcClient interface method to a gRPC unary RPC. The
value is the gRPC method name (e.g. SayHello) and is combined
with the interface-level GrpcClient.value() to form
/<service>/<method>. The optional service() overrides the
interface-level service path for a single method (useful when an
interface aggregates calls into multiple services).
Streaming RPCs are not supported in this release – only unary (single request, single response).
Methods
public abstract String value() | The gRPC method name as declared in the .proto rpc line, e.g. SayHello. |
public abstract String service() default "" | Optional override of the interface-level service path. |
Method details
value
public abstract String value()The gRPC method name as declared in the
.proto rpc line,
e.g. SayHello. Joined to the service path via /.service
public abstract String service() default ""Optional override of the interface-level service path. Empty
string means inherit from
GrpcClient.value().