package com.kiisoo.ic.common;

import com.lmax.disruptor.WorkHandler;

/**
 *  数据槽工厂
 * Created by hc on 2019/10/22
 */
public abstract class AbstractMsgEventHandler implements WorkHandler<MsgEvent> {

    @Override
    public void onEvent(MsgEvent msgEvent) throws Exception {
        DisruptorDataI dataMsg = msgEvent.getData();
        handler(dataMsg);
    }

    /**
     * 消息对象处理
     * @param dataMsg 消息
     */
    public abstract void handler(DisruptorDataI dataMsg);
}