Class GrpcServiceBuilder
- java.lang.Object
-
- io.helidon.microprofile.grpc.core.AbstractServiceBuilder
-
- io.helidon.microprofile.grpc.server.GrpcServiceBuilder
-
- All Implemented Interfaces:
Builder<ServiceDescriptor>
,Supplier<ServiceDescriptor>
public class GrpcServiceBuilder extends AbstractServiceBuilder implements Builder<ServiceDescriptor>
A builder for constructing aServiceDescriptor
instances from an annotated POJOs.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceDescriptor
build()
Create aServiceDescriptor.Builder
introspected class.static GrpcServiceBuilder
create(Class<?> serviceClass, Supplier<?> instance, BeanManager beanManager)
Create aGrpcServiceBuilder
for a given gRPC service class.static GrpcServiceBuilder
create(Class<?> serviceClass, BeanManager beanManager)
Create a new introspection modeller 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 Detail
-
create
public static GrpcServiceBuilder create(Object service, BeanManager beanManager)
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
public static GrpcServiceBuilder create(Class<?> serviceClass, BeanManager beanManager)
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<?> instance, BeanManager beanManager)
Create aGrpcServiceBuilder
for a given gRPC service class.- Parameters:
serviceClass
- gRPC service (handler) class.instance
- the target instance to call gRPC handler methods onbeanManager
- theBeanManager
to use to look-up CDI beans.- Returns:
- a
GrpcServiceBuilder
- Throws:
NullPointerException
- if the service or instance parameters are null
-
build
public ServiceDescriptor build()
Create aServiceDescriptor.Builder
introspected class.- Specified by:
build
in interfaceBuilder<ServiceDescriptor>
- Returns:
- a
ServiceDescriptor.Builder
for the introspected class.
-
-