com.mc.netty.handler.coder.ImMessageDecoder.java Source code

Java tutorial

Introduction

Here is the source code for com.mc.netty.handler.coder.ImMessageDecoder.java

Source

/*
 * Copyright 2015-2020 wuage.com All right reserved. This software is the
 * confidential and proprietary information of Alibaba.com ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with Wuage.com.
 */
package com.mc.netty.handler.coder;

import java.util.List;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;

/**
 * ImMessageDecoder.java??TODO ?? 
 * @author macun 201735 ?9:00:53
 */
public class ImMessageDecoder extends ByteToMessageDecoder {

    @Override
    protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
        System.out.println("begin decodes message.....");
        System.out.println(in);
    }

}