package kr.gmtc.gw.standstatus.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import kr.gmtc.gw.comp.rest.vo.RestServiceData;
import kr.gmtc.gw.standstatus.database.dto.DataLoadDTO;
import kr.gmtc.gw.standstatus.kafka.vo.AiVideoMetaData;
import kr.gmtc.gw.standstatus.vo.AlarmMsgVO;

import javax.annotation.PostConstruct;

import java.lang.reflect.Array;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;

//@Configuration("ServiceConfig")
public class ServiceConfig {
	
	@Value("${root}")
	private String root;

	@PostConstruct
	private void initialize() {
	}

	@Bean(name = "dataLoadDTO")
	public DataLoadDTO dataLoadDTO(){
		return new DataLoadDTO();
	}
	
	@Bean(name = "recvVideoQ")
	public LinkedBlockingQueue<AiVideoMetaData> recvVideoQ(){
		return new LinkedBlockingQueue<AiVideoMetaData>();
	}

	@Bean(name = "alamMsgQ")
	public Queue<AlarmMsgVO> alamMsgQ(){
		return new LinkedBlockingQueue<AlarmMsgVO>();
	}

	@Bean(name = "alamEndChkList")
	public LinkedList<AlarmMsgVO> alamEndChkList(){
		return new LinkedList<AlarmMsgVO>();
	}

	@Bean(name = "serviceList")
	public Map<Integer, LinkedList<RestServiceData>> serviceList(){
		return new HashMap<Integer, LinkedList<RestServiceData>>();
	}

	@Bean(name = "serviceRunnig")
	public boolean serviceRunnig(){
		return false;
	}	

	// @Bean(name = "queueManageBean")
	// public QueueManageBean queueManageBean(){
	// 	return new QueueManageBean();
	// }

	@Bean(name = "testStandStsMap")
	public HashMap<String, String> testStandStsMap(){
		return new LinkedHashMap<String, String>();
	}

	@Bean(name = "testStandStsMapAI")
	public HashMap<String, String[]> testStandStsMapAI(){
		return new LinkedHashMap<String, String[]>();
	}
	
}
