package net.northking.cctp.element.internal.protocol.socket;

import java.io.InputStream;
import java.util.concurrent.FutureTask;

/**
 * MessageProtocol
 *
 * @author fengxiang.zhang
 * @date 2022/4/6
 * @since 1.0
 */
public interface MessageHandler {

    /**
     * 协议名称
     */
    String getProtocolName();

    /**
     * 获取请求报文
     */
    byte[] getRequestMessage(String request) throws Exception;

    /**
     * 获取响应报文
     */
    FutureTask<SocketResponseData> getResponseFuture(InputStream in) throws Exception;
}
