public class NettyLumberJackServerImpl extends NettyAbstractServer implements NettyReaderByteBufCallback, NettySocketServer<Map<String,String>>
bossGroup, sslCtx, sslSessionResumption, workerGroupbootstrap, host, maxPayloadLength, metricsContext, port, protocol, readSocketTimeoutAction, readSocketTimeoutMs, ssl, sslCiphers, sslProtocol, sslProvider, useNettyCompression| Constructor and Description |
|---|
NettyLumberJackServerImpl(org.thales.punch.settings.api.ISettingsMap settings,
org.thales.punch.libraries.metrics.api.IMetricContext metricsContext)
Create a new single-threaded asynchronous TCP server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListeningAddress(org.thales.punch.settings.api.ISettingsMap address)
Add a listening socket to this server thread.
|
void |
onReceive(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
com.codahale.metrics.Counter rec,
com.codahale.metrics.Counter sent)
Called when a
NettySocketServer has received data. |
void |
run()
Effectively runs the server.
|
NettyLumberJackServerImpl |
setCallback(INettyReaderCallback<Map<String,String>> handler) |
String |
toString() |
isStopped, start, stopgetFileFromString, getSslProviderclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisStopped, stoppublic NettyLumberJackServerImpl(org.thales.punch.settings.api.ISettingsMap settings,
org.thales.punch.libraries.metrics.api.IMetricContext metricsContext)
settings - the configuration settingsmetricsContext - provider of metrics name prefix, metrics registry and metrics context tagspublic NettyLumberJackServerImpl setCallback(INettyReaderCallback<Map<String,String>> handler)
setCallback in interface NettySocketServer<Map<String,String>>handler - your data callbackpublic void run()
NettySocketServerNettySocketServer.stop() is made.public void onReceive(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
com.codahale.metrics.Counter rec,
com.codahale.metrics.Counter sent)
NettyReaderByteBufCallbackNettySocketServer has received data.onReceive in interface NettyReaderByteBufCallbackctx - the receiving channel context .in - the received data.rec - the received data counter.sent - the sent data counter.public void addListeningAddress(org.thales.punch.settings.api.ISettingsMap address)
NettySocketServeraddListeningAddress in interface NettySocketServer<Map<String,String>>address - the host port address.Copyright © 2023. All rights reserved.