public class NettyServer
extends services.moleculer.service.Service
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
address |
protected io.netty.handler.ssl.SslContext |
cachedSslContext |
protected ApiGateway |
gateway |
protected io.netty.channel.ChannelHandler |
handler |
protected java.lang.String |
keyCertChainFilePath |
protected java.lang.String |
keyFilePath |
protected java.lang.String |
keyStoreFilePath |
protected java.lang.String |
keyStorePassword |
protected java.lang.String |
keyStoreType |
protected boolean |
openSslSessionCacheEnabled |
protected int |
port |
protected boolean |
shutDownThreadPools |
protected io.netty.channel.EventLoopGroup |
threadGroup |
protected javax.net.ssl.TrustManagerFactory |
trustManagerFactory |
protected boolean |
useSSL |
protected int |
webSocketCleanupSeconds |
protected NettyWebSocketRegistry |
webSocketRegistry |
| Constructor and Description |
|---|
NettyServer() |
NettyServer(int port) |
| Modifier and Type | Method and Description |
|---|---|
protected io.netty.handler.ssl.SslHandler |
createSslHandler(io.netty.channel.Channel ch) |
java.lang.String |
getAddress() |
io.netty.channel.ChannelHandler |
getHandler() |
java.lang.String |
getKeyCertChainFilePath() |
java.lang.String |
getKeyFilePath() |
java.lang.String |
getKeyStoreFilePath() |
java.lang.String |
getKeyStorePassword() |
java.lang.String |
getKeyStoreType() |
int |
getPort() |
protected io.netty.handler.ssl.SslContext |
getSslContext() |
io.netty.channel.EventLoopGroup |
getThreadGroup() |
javax.net.ssl.TrustManagerFactory |
getTrustManagerFactory() |
int |
getWebSocketCleanupSeconds() |
boolean |
isOpenSslSessionCacheEnabled() |
boolean |
isShutDownThreadPools() |
boolean |
isUseSSL() |
void |
setAddress(java.lang.String address) |
void |
setHandler(io.netty.channel.ChannelHandler handler) |
void |
setKeyCertChainFilePath(java.lang.String keyCertChainFilePath) |
void |
setKeyFilePath(java.lang.String keyFilePath) |
void |
setKeyStoreFilePath(java.lang.String keyStoreFilePath) |
void |
setKeyStorePassword(java.lang.String keyStorePassword) |
void |
setKeyStoreType(java.lang.String keyStoreType) |
void |
setOpenSslSessionCacheEnabled(boolean openSslSessionCacheEnabled) |
void |
setPort(int port) |
void |
setShutDownThreadPools(boolean shutDownThreadPools) |
void |
setThreadGroup(io.netty.channel.EventLoopGroup singletonGroup) |
void |
setTrustManagerFactory(javax.net.ssl.TrustManagerFactory trustManagerFactory) |
void |
setUseSSL(boolean useSSL) |
void |
setWebSocketCleanupSeconds(int webSocketCleanupSeconds) |
void |
started(services.moleculer.ServiceBroker broker) |
void |
stopped() |
protected ApiGateway gateway
protected int port
protected java.lang.String address
protected io.netty.channel.EventLoopGroup threadGroup
protected io.netty.channel.ChannelHandler handler
protected int webSocketCleanupSeconds
protected boolean shutDownThreadPools
protected boolean useSSL
protected javax.net.ssl.TrustManagerFactory trustManagerFactory
protected java.lang.String keyStoreFilePath
protected java.lang.String keyStorePassword
protected java.lang.String keyStoreType
protected java.lang.String keyCertChainFilePath
protected java.lang.String keyFilePath
protected boolean openSslSessionCacheEnabled
protected io.netty.handler.ssl.SslContext cachedSslContext
protected NettyWebSocketRegistry webSocketRegistry
public void started(services.moleculer.ServiceBroker broker)
throws java.lang.Exception
started in interface services.moleculer.service.MoleculerLifecyclestarted in class services.moleculer.service.MoleculerComponentjava.lang.Exceptionpublic void stopped()
stopped in interface services.moleculer.service.MoleculerLifecyclestopped in class services.moleculer.service.MoleculerComponentprotected io.netty.handler.ssl.SslHandler createSslHandler(io.netty.channel.Channel ch)
throws java.lang.Exception
java.lang.Exceptionprotected io.netty.handler.ssl.SslContext getSslContext()
throws java.lang.Exception
java.lang.Exceptionpublic int getWebSocketCleanupSeconds()
public void setWebSocketCleanupSeconds(int webSocketCleanupSeconds)
public int getPort()
public void setPort(int port)
public boolean isUseSSL()
public void setUseSSL(boolean useSSL)
public javax.net.ssl.TrustManagerFactory getTrustManagerFactory()
public void setTrustManagerFactory(javax.net.ssl.TrustManagerFactory trustManagerFactory)
public java.lang.String getKeyStoreFilePath()
public void setKeyStoreFilePath(java.lang.String keyStoreFilePath)
public java.lang.String getKeyStorePassword()
public void setKeyStorePassword(java.lang.String keyStorePassword)
public java.lang.String getKeyStoreType()
public void setKeyStoreType(java.lang.String keyStoreType)
public java.lang.String getKeyCertChainFilePath()
public void setKeyCertChainFilePath(java.lang.String keyCertChainFilePath)
public java.lang.String getKeyFilePath()
public void setKeyFilePath(java.lang.String keyFilePath)
public boolean isOpenSslSessionCacheEnabled()
public void setOpenSslSessionCacheEnabled(boolean openSslSessionCacheEnabled)
public java.lang.String getAddress()
public void setAddress(java.lang.String address)
public io.netty.channel.EventLoopGroup getThreadGroup()
public void setThreadGroup(io.netty.channel.EventLoopGroup singletonGroup)
public io.netty.channel.ChannelHandler getHandler()
public void setHandler(io.netty.channel.ChannelHandler handler)
public boolean isShutDownThreadPools()
public void setShutDownThreadPools(boolean shutDownThreadPools)