public class NettyRelpTuple extends Object implements INettyTuple<RELPFrame>
| Constructor and Description |
|---|
NettyRelpTuple(RELPFrame frame,
io.netty.channel.ChannelHandlerContext ctx,
RELPEncoder encoder)
Ctor
|
| Modifier and Type | Method and Description |
|---|---|
void |
ack()
Acknowledge that NettyData.
|
void |
fail()
Signal the peer about the failure to process that NettyData.
|
RELPFrame |
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.
|
static io.netty.buffer.ByteBuf |
toByteBuf(byte[] bb) |
String |
toString() |
public NettyRelpTuple(RELPFrame frame, io.netty.channel.ChannelHandlerContext ctx, RELPEncoder encoder)
frame - ctx - encoder - public InetSocketAddress getLocalAddress()
INettyTuplegetLocalAddress in interface INettyTuple<RELPFrame>public InetSocketAddress getRemoteAddress()
INettyTuplegetRemoteAddress in interface INettyTuple<RELPFrame>public RELPFrame getData()
INettyTupleIf 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.
getData in interface INettyTuple<RELPFrame>public void fail()
INettyTupleWhat 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.
fail in interface INettyTuple<RELPFrame>public void ack()
INettyTupleWhat happens is up to the underlying connector. It will be a no-operation if the connector does not support an acknowledged mode.
ack in interface INettyTuple<RELPFrame>public static io.netty.buffer.ByteBuf toByteBuf(byte[] bb)
public int getDataLength()
getDataLength in interface INettyTuple<RELPFrame>Copyright © 2023. All rights reserved.