Package dagger.grpc.server
Annotation Type GrpcService
-
@Documented @Target(TYPE) public @interface GrpcService
Annotates a class that implements a gRPC service.Generates several types when annotating a class
Foo
:- Interfaces
FooComponent
andFooComponent.Factory
. - Modules
FooGrpcProxyModule
andFooGrpcServiceModule
.
To use these types to configure a server:
- Create a subcomponent that implements
FooComponent
and installsFooGrpcServiceModule
. - Install
NettyServerModule
or anotherServerModule
subclass andFooGrpcProxyModule
into your@Singleton
component. - Bind an implementation of
FooComponent.Factory
in your@Singleton
component. The implementation will typically inject the@Singleton
component and call subcomponent factory methods to instantiate the correct subcomponent.
- Interfaces
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class<?>
grpcClass
The class that gRPC generates from the proto service definition.
-