T - the data typepublic interface INettyTuple<T>
INettyTuple whenever a netty client or server receives some data.
This class lets you acknowledge the data (assuming the underlying client and server support that),
and, of course, retrieve the received data.| Modifier and Type | Method and Description |
|---|---|
void |
ack()
Acknowledge that NettyData.
|
void |
fail()
Signal the peer about the failure to process that NettyData.
|
T |
getData()
The general case is to receive a Json document (as is, or lumberjack encoded),
made of key value pairs.
|
int |
getDataLength() |
InetSocketAddress |
getLocalAddress()
Get the local (i.e.
|
InetSocketAddress |
getRemoteAddress()
Get the remote (i.e.
|
T getData()
If however a single String is received, for instance from a syslog plain client, then you will find a single entry. To avoid the burden and the performance penalty to always retrieve it from a map, you can use the getSingleData method.
void fail()
What action will be taken is up to the underlying connector. It will be a no-operation if the connector does not support an acknowledged mode.
void ack()
What happens is up to the underlying connector. It will be a no-operation if the connector does not support an acknowledged mode.
InetSocketAddress getLocalAddress()
InetSocketAddress getRemoteAddress()
int getDataLength()
Copyright © 2023. All rights reserved.