Package org.hertsstack.http
Interface HertsHttpEngineBuilder
-
public interface HertsHttpEngineBuilder
Herts http server engine builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HertsHttpEngine
build()
Buildjava.util.List<org.hertsstack.core.service.HertsService>
getHertsRpcServices()
Get registered HertsRpcServicejava.util.Map<java.lang.String,HertsHttpInterceptor>
getInterceptors()
Get interceptororg.hertsstack.core.context.HertsMetricsSetting
getMetricsSetting()
Get Metrics settingint
getPort()
Get port numberorg.eclipse.jetty.util.ssl.SslContextFactory
getSslContextFactory()
Get ssl contextHertsHttpEngineBuilder
registerHertsHttpService(org.hertsstack.core.service.HertsService hertsRpcService)
Add implementation service Not interfaceHertsHttpEngineBuilder
registerHertsHttpService(org.hertsstack.core.service.HertsService hertsRpcService, HertsHttpInterceptor interceptor)
Add implementation service Not interfaceHertsHttpEngineBuilder
setMetricsSetting(org.hertsstack.core.context.HertsMetricsSetting metricsSetting)
Set metrics setting informationHertsHttpEngineBuilder
setPort(int port)
Set portHertsHttpEngineBuilder
setSsl(org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory, int port)
Set ssl for Jetty.
-
-
-
Method Detail
-
registerHertsHttpService
HertsHttpEngineBuilder registerHertsHttpService(org.hertsstack.core.service.HertsService hertsRpcService, @Nullable HertsHttpInterceptor interceptor)
Add implementation service Not interface- Parameters:
hertsRpcService
- HertsCoreServiceinterceptor
- Interceptor- Returns:
- HertHttpEngineBuilder
-
registerHertsHttpService
HertsHttpEngineBuilder registerHertsHttpService(org.hertsstack.core.service.HertsService hertsRpcService)
Add implementation service Not interface- Parameters:
hertsRpcService
- HertsCoreService- Returns:
- HertHttpEngineBuilder
-
setPort
HertsHttpEngineBuilder setPort(int port)
Set port- Parameters:
port
- Port- Returns:
- HertHttpEngineBuilder
-
setSsl
HertsHttpEngineBuilder setSsl(org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory, int port)
Set ssl for Jetty.- Parameters:
sslContextFactory
- SslContextFactoryport
- Port- Returns:
- HertHttpEngineBuilder
-
setMetricsSetting
HertsHttpEngineBuilder setMetricsSetting(org.hertsstack.core.context.HertsMetricsSetting metricsSetting)
Set metrics setting information- Parameters:
metricsSetting
- HertsHttpMetricsSetting- Returns:
- HertHttpEngineBuilder
-
getHertsRpcServices
java.util.List<org.hertsstack.core.service.HertsService> getHertsRpcServices()
Get registered HertsRpcService- Returns:
- HertsRpcService of List
-
getInterceptors
java.util.Map<java.lang.String,HertsHttpInterceptor> getInterceptors()
Get interceptor- Returns:
- HertsHttpInterceptor
-
getMetricsSetting
org.hertsstack.core.context.HertsMetricsSetting getMetricsSetting()
Get Metrics setting- Returns:
- HertsMetricsSetting
-
getSslContextFactory
org.eclipse.jetty.util.ssl.SslContextFactory getSslContextFactory()
Get ssl context- Returns:
- SslContextFactory
-
getPort
int getPort()
Get port number- Returns:
- integer port
-
build
HertsHttpEngine build()
Build- Returns:
- HertsHttpEngine
-
-