@ChannelHandler.Sharable
public class GelfMessageChunkEncoder
extends io.netty.handler.codec.MessageToMessageEncoder<io.netty.buffer.ByteBuf>
| Constructor and Description |
|---|
GelfMessageChunkEncoder()
Creates a new instance with a random machine identifier used in the generation of the message ID.
|
GelfMessageChunkEncoder(byte[] machineIdentifier)
Creates a new instance with a given machine identifier used in the generation of the message ID.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf buf,
List<Object> out) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
acceptOutboundMessage, writebind, close, connect, deregister, disconnect, flush, readensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic GelfMessageChunkEncoder(byte[] machineIdentifier)
Usually the hostname of the client makes a good enough machine identifier.
machineIdentifier - the machine identifier (only the first 4 bytes are being used)public GelfMessageChunkEncoder()
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in class io.netty.channel.ChannelHandlerAdapterExceptionCopyright © 2014–2017 Graylog, Inc.. All rights reserved.