Package org.hertsstack.rpc
Interface RpcServer
-
public interface RpcServerHerts server engine builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RpcServeraddCustomService(io.grpc.BindableService grpcService, org.hertsstack.core.context.HertsType hertsType, io.grpc.ServerInterceptor interceptor)Add custom gRPC serviceRpcServeraddShutdownHook(org.hertsstack.rpc.HertsRpcServerShutdownHook hook)Add server shutdown hook.HertsRpcServerEnginebuild()Build HertsCoreEngineRpcServerenableMetrics(org.hertsstack.core.context.HertsMetricsSetting metricsSetting)Metrics settingRpcServerloadBalancingBroker(org.hertsstack.broker.ReactiveBroker broker)Load balancing type.RpcServerregisterHertsReactiveRpcService(org.hertsstack.core.service.HertsReactiveService hertsReactiveService)Register HertsReactiveService with Interceptor.RpcServerregisterHertsReactiveRpcService(org.hertsstack.core.service.HertsReactiveService hertsReactiveService, io.grpc.ServerInterceptor interceptor)Register HertsReactiveService with Interceptor.RpcServerregisterHertsRpcService(org.hertsstack.core.service.HertsService hertsRpcService)Register Herts serviceRpcServerregisterHertsRpcService(org.hertsstack.core.service.HertsService hertsRpcService, io.grpc.ServerInterceptor interceptor)Register Herts serviceRpcServersecure(io.grpc.ServerCredentials credentials)Secure connection
-
-
-
Method Detail
-
registerHertsReactiveRpcService
RpcServer registerHertsReactiveRpcService(org.hertsstack.core.service.HertsReactiveService hertsReactiveService, @Nullable io.grpc.ServerInterceptor interceptor)
Register HertsReactiveService with Interceptor.- Parameters:
hertsReactiveService- HertsReactiveServiceinterceptor- 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- HertsCoreServiceinterceptor- 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- BindableServicehertsType- HertsTypeinterceptor- Interceptor- Returns:
- HertsCoreEngineBuilder
-
build
HertsRpcServerEngine build()
Build HertsCoreEngine- Returns:
- HertsCoreEngine
-
-