
cocaine.netty.MessageDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cocaine-core Show documentation
Show all versions of cocaine-core Show documentation
Core classes for Cocaine Application Engine.
package cocaine.netty;
import java.io.EOFException;
import java.nio.ByteBuffer;
import java.util.List;
import cocaine.message.Message;
import cocaine.msgpack.MessageTemplate;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import org.apache.log4j.Logger;
import org.msgpack.MessagePack;
/**
* @author Anton Bobukh
*/
public class MessageDecoder extends ByteToMessageDecoder {
private static final Logger logger = Logger.getLogger(MessageDecoder.class);
private final MessagePack pack;
public MessageDecoder(MessagePack pack) {
this.pack = pack;
}
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy