/*     */ import java.io.BufferedInputStream;
/*     */ import java.io.FileInputStream;
/*     */ import java.util.ArrayList;
/*     */ import java.util.Date;
/*     */ import java.util.List;
/*     */ import java.util.Properties;
/*     */ import org.apache.log4j.Logger;
/*     */ import org.apache.log4j.PropertyConfigurator;
/*     */ import org.quartz.DisallowConcurrentExecution;
/*     */ import org.quartz.Job;
/*     */ import org.quartz.JobExecutionContext;
/*     */ import org.quartz.JobExecutionException;
/*     */ import org.quartz.JobKey;
/*     */ import org.quartz.PersistJobDataAfterExecution;
/*     */ 
/*     */ @PersistJobDataAfterExecution
/*     */ @DisallowConcurrentExecution
/*     */ public class AnprImageJob
/*     */   implements Job
/*     */ {
/*     */   private String jobSays;
/*     */   private float myFloatValue;
/*     */   private ArrayList<Date> state;
/*  24 */   private String g_strTenel = "";
/*  25 */   private List<String> g_listN1 = new ArrayList<>();
/*  26 */   private List<String> g_listN3 = new ArrayList<>();
/*     */   
/*     */   private boolean g_isRunning = false;
/*     */   
/*  30 */   private final Logger logger = Logger.getLogger(AnprImageJob.class);
/*     */   
/*     */   public AnprImageJob() {
/*  33 */     PropertyConfigurator.configure("./log4j.properties");
/*     */ 
/*     */     
/*     */     try {
/*  37 */       String propFile = "./config.properties";
/*     */ 
/*     */       
/*  40 */       Properties props = new Properties();
/*     */ 
/*     */       
/*  43 */       FileInputStream fis = new FileInputStream(propFile);
/*     */ 
/*     */       
/*  46 */       props.load(new BufferedInputStream(fis));
/*     */       
/*  48 */       this.g_strTenel = props.getProperty("tennel_no");
/*     */       
/*  50 */       props.clear();
/*  51 */       props = null;
/*  52 */       System.out.println("===================== A");
/*     */       
/*  54 */       this.g_listN1.add("01");
/*  55 */       this.g_listN1.add("02");
/*  56 */       this.g_listN1.add("03");
/*  57 */       this.g_listN1.add("04");
/*  58 */       this.g_listN1.add("05");
/*  59 */       this.g_listN1.add("06");
/*  60 */       this.g_listN1.add("07");
/*  61 */       this.g_listN1.add("08");
/*     */       
/*  63 */       this.g_listN3.add("01");
/*  64 */       this.g_listN3.add("02");
/*  65 */       this.g_listN3.add("03");
/*  66 */       this.g_listN3.add("04");
/*     */ 
/*     */       
/*  69 */       this.g_listN3.add("07");
/*  70 */       this.g_listN3.add("08");
/*  71 */       this.g_listN3.add("09");
/*  72 */       this.g_listN3.add("10");
/*  73 */       System.out.println("===================== B");
/*  74 */     } catch (Exception e) {
/*  75 */       this.logger.debug("Exception : " + e);
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void execute(JobExecutionContext context) throws JobExecutionException {
/*  85 */     JobKey key = context.getJobDetail().getKey();
/*  86 */     this.state.add(new Date());
/*     */     
/*  88 */     this.logger.info("Instance " + key + " of DmbJob says: " + this.jobSays + ", and val is: " + this.myFloatValue + 
/*  89 */         ", state size:" + this.state.size() + "," + this.state.get(this.state.size() - 1));
/*     */     
/*  91 */     this.logger.debug("======== 차로개수 : " + this.g_listN3.size());
/*  92 */     List<String> list = new ArrayList<>();
/*  93 */     if (this.g_strTenel.equals("3")) {
/*  94 */       list.addAll(this.g_listN3);
/*  95 */     } else if (this.g_strTenel.equals("1")) {
/*  96 */       list.addAll(this.g_listN1);
/*     */     } else {
/*     */       return;
/*     */     } 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/* 118 */     if (this.g_isRunning) {
/* 119 */       this.logger.debug("======== 기존 쓰레드 미완료로 미수행");
/*     */       
/*     */       return;
/*     */     } 
/*     */     
/* 124 */     this.g_isRunning = true;
/*     */     
/* 126 */     SendThread obj = null;
/* 127 */     for (int i = 0; i < list.size(); i++) {
/*     */       
/* 129 */       this.logger.info(String.format("%s차로 시작", new Object[] { list.get(i) }));
/*     */       
/* 131 */       obj = new SendThread(list.get(i));
/* 132 */       obj.runCarNoImageSend();
/*     */ 
/*     */       
/*     */       try {
/* 136 */         Thread.sleep(5L);
/*     */       }
/* 138 */       catch (InterruptedException e) {
/* 139 */         e.printStackTrace();
/*     */       } finally {
/*     */         
/* 142 */         this.g_isRunning = false;
/*     */       } 
/*     */       
/* 145 */       this.logger.info(String.format("%s차로 끝", new Object[] { list.get(i) }));
/*     */     } 
/*     */   }
/*     */ 
/*     */   
/*     */   public void setJobSays(String jobSays) {
/* 151 */     this.jobSays = jobSays;
/*     */   }
/*     */   
/*     */   public void setMyFloatValue(float myFloatValue) {
/* 155 */     this.myFloatValue = myFloatValue;
/*     */   }
/*     */   
/*     */   public void setState(ArrayList<Date> state) {
/* 159 */     this.state = state;
/*     */   }
/*     */ }


/* Location:              C:\Users\XIT_LBJ\Desktop\남산 혼잡통행료\운영환경 실 파일\3호 연계서버\car이미지자르\anpr스테이터스센드\anpr_status_send.jar!\AnprImageJob.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */