All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.magician.tcp.codec.ProtocolCodec Maven / Gradle / Ivy

There is a newer version: 2.0.7
Show newest version
package io.magician.tcp.codec;

import io.magician.tcp.workers.Worker;

/**
 * 协议数据解码器
 * @param 
 */
public interface ProtocolCodec {

    /**
     * 解码
     * @param worker 一个工作者
     * @return
     * @throws Exception
     */
    T codecData(Worker worker) throws Exception;

    /**
     * 解码完毕后,如果是一个完整的报文,则自动调用这个方法执行handler
     * @param t
     * @throws Exception
     */
    void handler(T t) throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy