Interface RpcServer


  • public interface RpcServer
    Herts server engine builder
    • Method Detail

      • registerHertsReactiveRpcService

        RpcServer registerHertsReactiveRpcService​(org.hertsstack.core.service.HertsReactiveService hertsReactiveService,
                                                  @Nullable
                                                  io.grpc.ServerInterceptor interceptor)
        Register HertsReactiveService with Interceptor.
        Parameters:
        hertsReactiveService - HertsReactiveService
        interceptor - Interceptor
        Returns:
        HertsCoreEngineBuilder
      • registerHertsReactiveRpcService

        RpcServer registerHertsReactiveRpcService​(org.hertsstack.core.service.HertsReactiveService hertsReactiveService)
        Register HertsReactiveService with Interceptor.
        Parameters:
        hertsReactiveService - HertsReactiveService
        Returns:
        HertsRpcEngineBuilder
      • registerHertsRpcService

        RpcServer registerHertsRpcService​(org.hertsstack.core.service.HertsService hertsRpcService,
                                          @Nullable
                                          io.grpc.ServerInterceptor interceptor)
        Register Herts service
        Parameters:
        hertsRpcService - HertsCoreService
        interceptor - Interceptor
        Returns:
        HertsCoreEngineBuilder
      • registerHertsRpcService

        RpcServer registerHertsRpcService​(org.hertsstack.core.service.HertsService hertsRpcService)
        Register Herts service
        Parameters:
        hertsRpcService - HertsCoreService
        Returns:
        HertsCoreEngineBuilder
      • addShutdownHook

        RpcServer addShutdownHook​(org.hertsstack.rpc.HertsRpcServerShutdownHook hook)
        Add server shutdown hook.
        Parameters:
        hook - HertsRpcServerShutdownHook
        Returns:
        HertsRpcEngineBuilder
      • loadBalancingBroker

        RpcServer loadBalancingBroker​(org.hertsstack.broker.ReactiveBroker broker)
        Load balancing type. Default is LocalGroupRepository.
        Parameters:
        broker - ReactiveBroker
        Returns:
        HertsRpcEngineBuilder
      • secure

        RpcServer secure​(io.grpc.ServerCredentials credentials)
        Secure connection
        Parameters:
        credentials - ServerCredentials for gRPC
        Returns:
        HertsCoreEngineBuilder
      • enableMetrics

        RpcServer enableMetrics​(org.hertsstack.core.context.HertsMetricsSetting metricsSetting)
        Metrics setting
        Parameters:
        metricsSetting - HertsMetricsSetting
        Returns:
        HertsCoreEngineBuilder
      • addCustomService

        RpcServer addCustomService​(io.grpc.BindableService grpcService,
                                   org.hertsstack.core.context.HertsType hertsType,
                                   @Nullable
                                   io.grpc.ServerInterceptor interceptor)
        Add custom gRPC service
        Parameters:
        grpcService - BindableService
        hertsType - HertsType
        interceptor - Interceptor
        Returns:
        HertsCoreEngineBuilder