me.moocar.logbackgelf
Class PayloadChunker
java.lang.Object
me.moocar.logbackgelf.PayloadChunker
public class PayloadChunker
- extends Object
Responsible for converting a Gelf Payload into chunks if need be.
A Payload is the raw Gzipped Gelf JSON message.
A Chunk is comprised of a Gelf Chunk header as well as a portion of the payload
|
Method Summary |
List<byte[]> |
chunkIt(byte[] payload)
Converts a payload into a number of full GELF chunks. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PayloadChunker
public PayloadChunker(int payloadThreshold,
int maxChunks,
MessageIdProvider messageIdProvider,
ChunkFactory chunkFactory)
chunkIt
public List<byte[]> chunkIt(byte[] payload)
- Converts a payload into a number of full GELF chunks.
- Parameters:
payload - The original gzipped payload
- Returns:
- A list of chunks that should be sent to the graylog2 server
Copyright © 2011-2014. All Rights Reserved.