T - the data class typepublic class NettyUdpServerImpl<T> extends Object implements NettySocketServer<T>
| Constructor and Description |
|---|
NettyUdpServerImpl(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.
|
boolean |
isStopped() |
void |
run()
Effectively runs the server.
|
NettyUdpServerImpl<T> |
setCallback(INettyReaderCallback<T> handler) |
void |
stop()
Stop the server.
|
String |
toString() |
public NettyUdpServerImpl(org.thales.punch.settings.api.ISettingsMap settings,
org.thales.punch.libraries.metrics.api.IMetricContext metricsContext)
settings - the settingsmetricsContext - the associated metricsContextpublic NettyUdpServerImpl<T> setCallback(INettyReaderCallback<T> handler)
setCallback in interface NettySocketServer<T>handler - your data callbackpublic void run()
NettySocketServerNettySocketServer.stop() is made.run in interface Runnablerun in interface NettySocketServer<T>public void stop()
NettySocketServerstop in interface NettySocketServer<T>public boolean isStopped()
isStopped in interface NettySocketServer<T>public void addListeningAddress(org.thales.punch.settings.api.ISettingsMap address)
NettySocketServeraddListeningAddress in interface NettySocketServer<T>address - the host port address.Copyright © 2023. All rights reserved.