@Documented
@Target(value=TYPE)
public @interface GrpcService
Generates several types when annotating a class Foo
:
FooComponent
and FooComponent.Factory
.
FooGrpcProxyModule
and FooGrpcServiceModule
.
To use these types to configure a server:
FooComponent
and installs FooGrpcServiceModule
.
NettyServerModule
or another ServerModule
subclass and FooGrpcProxyModule
into your @Singleton
component.
FooComponent.Factory
in your @Singleton
component. The
implementation will typically inject the @Singleton
component and call subcomponent factory methods to instantiate
the correct subcomponent.
Modifier and Type | Required Element and Description |
---|---|
java.lang.Class<?> |
grpcClass
The class that gRPC generates from the proto service definition.
|