Example usage for io.netty.handler.codec ByteToMessageDecoder subclass-usage

List of usage examples for io.netty.handler.codec ByteToMessageDecoder subclass-usage

Introduction

In this page you can find the example usage for io.netty.handler.codec ByteToMessageDecoder subclass-usage.

Usage

From source file io.airlift.drift.transport.netty.server.ThriftProtocolDetection.java

public class ThriftProtocolDetection extends ByteToMessageDecoder {
    private static final int UNFRAMED_MESSAGE_FLAG = 0x8000_0000;
    private static final int UNFRAMED_MESSAGE_MASK = 0x8000_0000;

    private static final int BINARY_PROTOCOL_VERSION_MASK = 0xFFFF_0000;
    private static final int BINARY_PROTOCOL_VERSION_1 = 0x8001_0000;

From source file io.airlift.drift.transport.netty.ThriftUnframedDecoder.java

class ThriftUnframedDecoder extends ByteToMessageDecoder {
    private final TProtocolFactory protocolFactory;
    private final int maxFrameSize;

    public ThriftUnframedDecoder(TProtocolFactory protocolFactory, DataSize maxFrameSize) {
        this.protocolFactory = requireNonNull(protocolFactory, "protocolFactory is null");

From source file io.aos.netty5.factorial.BigIntegerDecoder.java

/**
 * Decodes the binary representation of a {@link BigInteger} prepended
 * with a magic number ('F' or 0x46) and a 32-bit integer length prefix into a
 * {@link BigInteger} instance.  For example, { 'F', 0, 0, 0, 1, 42 } will be
 * decoded into new BigInteger("42").
 */

From source file io.aos.netty5.portunification.PortUnificationServerHandler.java

/**
 * Manipulates the current pipeline dynamically to switch protocols or enable
 * SSL or GZIP.
 */
public class PortUnificationServerHandler extends ByteToMessageDecoder {

From source file io.aos.netty5.socksproxy.SocksPortUnificationServerHandler.java

public class SocksPortUnificationServerHandler extends ByteToMessageDecoder {
    @Override
    protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
        ChannelPipeline p = ctx.pipeline();
        SocksProtocolVersion version = SocksProtocolVersion.valueOf(in.readByte());
        System.out.println(version);

From source file io.atomix.cluster.messaging.impl.MessageDecoder.java

/**
 * Decoder for inbound messages.
 */
public class MessageDecoder extends ByteToMessageDecoder {

    private final Logger log = LoggerFactory.getLogger(getClass());

From source file io.awacs.protocol.binary.BinaryMessageDecoder.java

/**
 * Created by pixyonly on 6/28/16.
 */
public class BinaryMessageDecoder extends ByteToMessageDecoder {

    @Override

From source file io.codis.nedis.handler.RedisResponseDecoder.java

/**
 * @author zhangduo
 */
public class RedisResponseDecoder extends ByteToMessageDecoder {

    public static final Object NULL_REPLY = new Object();

From source file io.github.stormcloud_dev.stormcloud.seralization.RORObjectDecoder.java

public class RORObjectDecoder extends ByteToMessageDecoder {

    @Override
    protected void decode(ChannelHandlerContext ctx, ByteBuf buf, List<Object> objects) throws Exception {
        ByteBuf leBuf = buf.order(LITTLE_ENDIAN);
        byte[] bytes = new byte[leBuf.readableBytes()];

From source file io.grpc.alts.internal.TsiFrameHandler.java

/**
 * Encrypts and decrypts TSI Frames. Writes are buffered here until {@link #flush} is called. Writes
 * must not be made before the TSI handshake is complete.
 */
public final class TsiFrameHandler extends ByteToMessageDecoder implements ChannelOutboundHandler {