Package dagger.grpc.server
Annotation 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.
-
Required Element Summary
-
Element Details
-
grpcClass
Class<?> grpcClassThe class that gRPC generates from the proto service definition.
-