Class GrpcStubFactoryVisitor
java.lang.Object
io.micronaut.grpc.processor.GrpcStubFactoryVisitor
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.core.util.Toggleable, io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
@Internal
public final class GrpcStubFactoryVisitor
extends Object
implements io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
Generates a bean factory for the client stubs of every gRPC service class that
protoc-gen-grpc-java
generates, so that stubs can be injected with @GrpcChannel without a hand-written factory.
Generated service classes are annotated with @io.grpc.stub.annotations.GrpcGenerated. For each public
static newXxxStub(io.grpc.Channel) method that returns a stub, the generated factory has a prototype bean
method that obtains the channel of the injection point from GrpcManagedChannelFactory and calls it.
- Since:
- 5.3.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind -
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.inject.visitor.TypeElementVisitor.VisitorKindvoidvisitClass(io.micronaut.inject.ast.ClassElement element, io.micronaut.inject.visitor.VisitorContext context) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrderMethods inherited from interface io.micronaut.core.util.Toggleable
isEnabledMethods inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
finish, getClassType, getElementType, getSupportedOptions, query, start, visitConstructor, visitEnumConstant, visitField, visitMethod
-
Constructor Details
-
GrpcStubFactoryVisitor
public GrpcStubFactoryVisitor()
-
-
Method Details
-
getSupportedAnnotationNames
-
getVisitorKind
-
visitClass
-