Class DefaultGrpcServiceConfigurer
java.lang.Object
org.springframework.grpc.server.service.DefaultGrpcServiceConfigurer
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, GrpcServiceConfigurer
public class DefaultGrpcServiceConfigurer
extends Object
implements GrpcServiceConfigurer, org.springframework.beans.factory.InitializingBean
Default
GrpcServiceConfigurer implementation that binds and configures services
with interceptors.- Author:
- Chris Bono
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultGrpcServiceConfigurer(org.springframework.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidio.grpc.ServerServiceDefinitionconfigure(GrpcServiceSpec serviceSpec, @Nullable GrpcServerFactory serverFactory) Configure and bind a gRPC server spec resulting in a service definition that can then be added to a gRPC server.
-
Constructor Details
-
DefaultGrpcServiceConfigurer
public DefaultGrpcServiceConfigurer(org.springframework.context.ApplicationContext applicationContext)
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
configure
public io.grpc.ServerServiceDefinition configure(GrpcServiceSpec serviceSpec, @Nullable GrpcServerFactory serverFactory) Description copied from interface:GrpcServiceConfigurerConfigure and bind a gRPC server spec resulting in a service definition that can then be added to a gRPC server.- Specified by:
configurein interfaceGrpcServiceConfigurer- Parameters:
serviceSpec- the spec containing the info about the serviceserverFactory- the factory that can be used to create a gRPC server, ornullif the service is not bound to a specific server factory.- Returns:
- bound and configured service definition that is ready to be added to a server
-