
org.logstash.beats.AckEncoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proxy Show documentation
Show all versions of proxy Show documentation
Service for batching and relaying metric traffic to Wavefront
package org.logstash.beats;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
/**
* This Class is mostly used in the test suite to make the right assertions with the encoded data
* frame. This class support creating v1 or v2 lumberjack frames.
*/
public class AckEncoder extends MessageToByteEncoder {
@Override
protected void encode(ChannelHandlerContext ctx, Ack ack, ByteBuf out) throws Exception {
out.writeByte(ack.getProtocol());
out.writeByte('A');
out.writeInt(ack.getSequence());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy