package com.sjyt.icom.asst.context.handle.srs;

import com.sjyt.icom.asst.common.event.SrsCallBackEvent;
import com.sjyt.icom.asst.context.publisher.SrsCallBackEventPublisher;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * <p>所有节点处理之后的逻辑类</p>
 * 发送通知事件
 * @author renyanru
 * @version V1.0.0
 * @date 2022/6/23 14:54
 */
@Slf4j
@Component
@AllArgsConstructor
public class RtspFinallyHandle extends RtspHandle{
    private final SrsCallBackEventPublisher publisher;

    /**
     * 执行链
     *
     * @param event 事件对象
     * @return r
     */
    @Override
    public Integer doChain(SrsCallBackEvent event) {
        log.info("FinallyHandle执行");
        publisher.publish(event);
        return SUCCESSFUL;
    }
}
