public class TcpSyslogServer<T> extends Object implements org.thales.punch.netty.api.INettyReaderCallback<T>, ISyslogServer
T is the type of the handled data. As of today it is always a String.
Constructor and Description |
---|
TcpSyslogServer(org.thales.punch.settings.api.ISettingsMap settings,
org.thales.punch.libraries.metrics.api.IMetricContext metricsContext,
ISyslogReceiver<T> receiver) |
Modifier and Type | Method and Description |
---|---|
TcpSyslogServer<T> |
addListeningAddress(org.thales.punch.settings.api.ISettingsMap settings,
ISyslogReceiver<T> receiver)
Add a listening address to this server.
|
void |
close()
Close the server
|
static <T> org.thales.punch.punchlang.util.ICodec<T> |
getCodec(org.thales.punch.settings.api.ISettingsMap settings)
Build specific codec from the caller configuration.
|
Class<?> |
getType() |
void |
onActive(io.netty.channel.ChannelHandlerContext channelHandlerContext) |
void |
onInactive(io.netty.channel.ChannelHandlerContext channelHandlerContext) |
void |
onReceive(io.netty.channel.ChannelHandlerContext channelHandlerContext,
org.thales.punch.netty.api.INettyTuple<T> tuple) |
void |
run() |
void |
tick()
Flush buffers after timeout, tick is only implemented for multiline codecs
|
public TcpSyslogServer(org.thales.punch.settings.api.ISettingsMap settings, org.thales.punch.libraries.metrics.api.IMetricContext metricsContext, ISyslogReceiver<T> receiver)
public void tick()
tick
in interface ISyslogServer
public void onActive(io.netty.channel.ChannelHandlerContext channelHandlerContext)
onActive
in interface org.thales.punch.netty.api.INettyReaderCallback<T>
public void onInactive(io.netty.channel.ChannelHandlerContext channelHandlerContext)
onInactive
in interface org.thales.punch.netty.api.INettyReaderCallback<T>
public void onReceive(io.netty.channel.ChannelHandlerContext channelHandlerContext, org.thales.punch.netty.api.INettyTuple<T> tuple)
onReceive
in interface org.thales.punch.netty.api.INettyReaderCallback<T>
public void close()
close
in interface AutoCloseable
public static <T> org.thales.punch.punchlang.util.ICodec<T> getCodec(org.thales.punch.settings.api.ISettingsMap settings)
settings
- the settings map with host port propertiespublic TcpSyslogServer<T> addListeningAddress(org.thales.punch.settings.api.ISettingsMap settings, ISyslogReceiver<T> receiver)
settings
- the settings map that includes the listenings host port propertiesreceiver
- the receiver interested by the dataCopyright © 2023. All rights reserved.