package com.steering.jobface.jhy.Servlet;

import com.steering.jobface.jhy.CollectionType.*;
import com.steering.jobface.jhy.Task.PhysicalCollectionToJhyDbTask;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import java.util.Timer;

/**
 *  检化验Servlet
 * Created by 朱少波 on 2018/3/22.
 */
public class jhyServlet  extends HttpServlet {

    public void init() throws ServletException {
        long schceduleTimeSecond = 10l;


        //同步拉伸试验采集  -- 天淮
        new Timer().scheduleAtFixedRate(new PhysicalCollectionToJhyDbTask(new TenslieCollectionTH()), 0,
                1000 * schceduleTimeSecond);

        //同步拉伸试验采集  -- 天淮
        new Timer().scheduleAtFixedRate(new PhysicalCollectionToJhyDbTask(new TenslieCollectionTHNew()), 0,
                1000 * schceduleTimeSecond);

        //同步拉伸试验采集
        /*new Timer().scheduleAtFixedRate(new PhysicalCollectionToJhyDbTask(new TenslieCollection()), 0,
                1000 * schceduleTimeSecond);*/


        //硬度采集同步
        /*new Timer().scheduleAtFixedRate(new PhysicalCollectionToJhyDbTask(new HardnessCollection()), 0,
                1000 * schceduleTimeSecond);*/

        // 冲击采集同步
        /*new Timer().scheduleAtFixedRate(new PhysicalCollectionToJhyDbTask(new ImpactCollection()), 0,
                1000 * schceduleTimeSecond);*/

    }

}
