Package dagger.grpc.server
Annotation Interface GrpcService
Annotates a class that implements a gRPC service.
Generates several types when annotating a class Foo:
- Interfaces
FooComponentandFooComponent.Factory. - Modules
FooGrpcProxyModuleandFooGrpcServiceModule.
To use these types to configure a server:
- Create a subcomponent that implements
FooComponentand installsFooGrpcServiceModule. - Install
NettyServerModuleor anotherServerModulesubclass andFooGrpcProxyModuleinto your@Singletoncomponent. - Bind an implementation of
FooComponent.Factoryin your@Singletoncomponent. The implementation will typically inject the@Singletoncomponent and call subcomponent factory methods to instantiate the correct subcomponent.
-
Required Element Summary
Required Elements
-
Element Details
-
grpcClass
Class<?> grpcClassThe class that gRPC generates from the proto service definition.
-