Exemplo n.º 1
0
 // Test
 public static void main(String args[]) {
   try {
     FtpData.loadProperties("ftp2cdrserver.cfg");
     System.out.println(FtpData.LOCAL_FOLDER);
     System.out.println(FtpData.FTP_SERVER);
     System.out.println(FtpData.SCHEDULE_TIME);
   } catch (IOException ex) {
     System.out.println(ex.getMessage());
   }
 }
Exemplo n.º 2
0
 public CDRServer()
 {
     dbpool = new DBPool();
     gateway = new GatewayCDR();
     Preference.loadProperties("gateway.cfg");
     FtpData.loadProperties("ftp2cdrserver.cfg");
     break MISSING_BLOCK_LABEL_51;
     IOException e;
     e;
     Logger.info("CDRServer:", "khong tim thay file cau hinh");
     dbpool;
     DBPool.ConfigDB();
     Logger.setLogWriter("log/cdr${yyyy-MM-dd}.log");
     break MISSING_BLOCK_LABEL_72;
     IOException ex;
     ex;
     Logger.setLogLevel("info,warn,error,crisis");
     return;
 }
Exemplo n.º 3
0
  public static void main(String[] args) {
    try {
      GatewayCDR gateway = new GatewayCDR();
      try {
        Preference.loadProperties("gateway.cfg");
        // if ("GPC".equals(Preference.mobileOperator) ||
        // "VIETTEL".equals(Preference.mobileOperator))
        FtpData.loadProperties("ftp2cdrserver.cfg");
      } catch (Exception e) {
        System.out.println("CDRServer: khong tim thay file cau hinh ");
      }
      gateway.addMoreConnection2Pool(1);

      if (args != null && args.length > 1) {
        System.out.println(">>>" + args[0] + "  >>>  " + args[1]);
        DBScanner.pushCDRinQueueEx8x99(args[0].trim(), args[1].trim());
      } else {
        System.out.println(">>>Thang 04 !!!");
        DBScanner.pushCDRinQueueEx8x99("060401000000", "060425093500");
      }
    } catch (DBException ex) {
      System.out.println(">>>>Loi: " + ex.toString());
    }
  }