Package dagger.grpc.server
Annotation Type GrpcService
-
@Documented @Target(TYPE) public @interface GrpcServiceAnnotates 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.
- Interfaces
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class<?>grpcClassThe class that gRPC generates from the proto service definition.
-