Class GrpcServiceBuilder
java.lang.Object
io.helidon.microprofile.grpc.core.AbstractServiceBuilder
io.helidon.microprofile.grpc.server.GrpcServiceBuilder
- All Implemented Interfaces:
Builder<GrpcServiceBuilder,
,GrpcServiceDescriptor> Supplier<GrpcServiceDescriptor>
public class GrpcServiceBuilder
extends AbstractServiceBuilder
implements Builder<GrpcServiceBuilder,GrpcServiceDescriptor>
A builder for constructing a
GrpcServiceDescriptor
instances from an annotated POJOs.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create aGrpcServiceDescriptor.Builder
introspected class.static GrpcServiceBuilder
create
(Class<?> serviceClass, BeanManager beanManager) Create a new introspection modeller for a given gRPC service class.static GrpcServiceBuilder
create
(Class<?> serviceClass, Supplier<?> instanceSupplier, BeanManager beanManager) Create aGrpcServiceBuilder
for a given gRPC service class.static GrpcServiceBuilder
create
(Object service, BeanManager beanManager) Create a new introspection modeller for a given gRPC service.Methods inherited from class io.helidon.microprofile.grpc.core.AbstractServiceBuilder
annotatedServiceClass, checkForNonPublicMethodIssues, createInstanceSupplier, determineMethodName, determineServiceName, getAllDeclaredMethods, getMarshallerSupplier, handlerSuppliers, instanceSupplier, isAnnotatedService, serviceClass
-
Method Details
-
create
Create a new introspection modeller for a given gRPC service.- Parameters:
service
- the service to call gRPC handler methods onbeanManager
- theBeanManager
to use to look-up CDI beans.- Returns:
- a
GrpcServiceBuilder
- Throws:
NullPointerException
- if the service is null
-
create
Create a new introspection modeller for a given gRPC service class.- Parameters:
serviceClass
- gRPC service (handler) class.beanManager
- theBeanManager
to use to look-up CDI beans.- Returns:
- a
GrpcServiceBuilder
- Throws:
NullPointerException
- if the service class is null
-
create
public static GrpcServiceBuilder create(Class<?> serviceClass, Supplier<?> instanceSupplier, BeanManager beanManager) Create aGrpcServiceBuilder
for a given gRPC service class.- Parameters:
serviceClass
- gRPC service (handler) class.instanceSupplier
- the target instanceSupplier to call gRPC handler methods onbeanManager
- theBeanManager
to use to look-up CDI beans.- Returns:
- a
GrpcServiceBuilder
- Throws:
NullPointerException
- if the service or instanceSupplier parameters are null
-
build
Create aGrpcServiceDescriptor.Builder
introspected class.- Specified by:
build
in interfaceBuilder<GrpcServiceBuilder,
GrpcServiceDescriptor> - Returns:
- a
GrpcServiceDescriptor.Builder
for the introspected class.
-