Package org.hertsstack.rpc
Interface RpcServer
-
public interface RpcServer
Herts server engine builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RpcServer
addCustomService(io.grpc.BindableService grpcService, org.hertsstack.core.context.HertsType hertsType, io.grpc.ServerInterceptor interceptor)
Add custom gRPC serviceRpcServer
addShutdownHook(org.hertsstack.rpc.HertsRpcServerShutdownHook hook)
Add server shutdown hook.HertsRpcServerEngine
build()
Build HertsCoreEngineRpcServer
enableMetrics(org.hertsstack.core.context.HertsMetricsSetting metricsSetting)
Metrics settingRpcServer
loadBalancingBroker(org.hertsstack.broker.ReactiveBroker broker)
Load balancing type.RpcServer
registerHertsReactiveRpcService(org.hertsstack.core.service.HertsReactiveService hertsReactiveService)
Register HertsReactiveService with Interceptor.RpcServer
registerHertsReactiveRpcService(org.hertsstack.core.service.HertsReactiveService hertsReactiveService, io.grpc.ServerInterceptor interceptor)
Register HertsReactiveService with Interceptor.RpcServer
registerHertsRpcService(org.hertsstack.core.service.HertsService hertsRpcService)
Register Herts serviceRpcServer
registerHertsRpcService(org.hertsstack.core.service.HertsService hertsRpcService, io.grpc.ServerInterceptor interceptor)
Register Herts serviceRpcServer
secure(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
-
-