コード例 #1
0
 private void insertIntoDB() {
   Database db = new Database();
   db.insertInstalledSofware(
       this._command.getParameter(),
       this._command.getClientID() + "",
       this._command.getFTP_File(),
       this._command.getFTP_IP());
 }
コード例 #2
0
 public void sendToClient() {
   Database data = new Database();
   String url = "";
   try {
     url = data.getClientIP(this._command.getClientID());
   } catch (SQLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   } catch (ClassNotFoundException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   } catch (Exception e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   String ip = url.split(":")[0];
   try {
     this._command.setFTP_IP(
         data.getFTP_IP_FILE(Integer.parseInt(this._command.getParameter()))[0]);
     this._command.setFTP_File(
         data.getFTP_IP_FILE(Integer.parseInt(this._command.getParameter()))[1]);
   } catch (NumberFormatException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   } catch (SQLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   } catch (ClassNotFoundException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   } catch (Exception e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   int port = Integer.parseInt(url.split(":")[1]);
   this._com.send(this._command, ip, port);
 }