package com.jay.monitor.data.server.process;

import com.alipay.remoting.BizContext;
import com.jay.monitor.data.core.enums.MsgTypeEnums;
import com.jay.monitor.data.core.model.serializable.URLDataDTO;
import com.jay.monitor.data.server.store.StoreDataManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Module 处理器
 * @Description 用于处理URL监控数据执行器
 * @Author liukaixiong
 * @Date 2020/10/23 15:52
 */
@Component
public class URLUserProcess extends AbstractUserProcess<URLDataDTO>   {

    private Logger logger = LoggerFactory.getLogger(URLUserProcess.class);

    @Autowired
    private StoreDataManager storeDataManager;

    @Override
    public Object handleRequest0(BizContext bizCtx, URLDataDTO request) throws Exception {
        storeDataManager.store(MsgTypeEnums.URL, request);
        return request;
    }

    @Override
    public List<String> multiInterest() {
        return getNamesList(URLDataDTO.class);
    }

}
