1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
public class RunServer {
static TargetRouter target;
private static int time0 = 600000;
private static int time1 = 900000;
private static int time1bis = 1200000;
public RunServer(TargetRouter target) throws IOException, Exception
{
this.target=target;
this.run();
}
public void run() throws IOException, Exception
{
new Thread(){public void run(){
while (true) {
try {
new Chassis_Monitoring(target); 1ere classe
} catch (IOException ex) { Logger.getLogger(RunServer.class.getName()).log(Level.SEVERE, null, ex);
} catch (Exception ex) {
Logger.getLogger(RunServer.class.getName()).log(Level.SEVERE, null, ex);
}
Thread.sleep(time0);
}
}
}.start();
new Thread(){public void run(){try {
while (true) {
new Total_Traffic_History(target); 2eme classe
} catch (IOException ex) {
Logger.getLogger(RunServer.class.getName()).log(Level.SEVERE, null, ex);
} catch (Exception ex) {
Logger.getLogger(RunServer.class.getName()).log(Level.SEVERE, null, ex);
}
Thread.sleep (time1);
}
}
}.start();
new Thread(){public void run(){
while (true) {
try {
new Throughput_History(target); 3iemme classe
} catch (IOException ex) {
Logger.getLogger(RunServer.class.getName()).log(Level.SEVERE, null, ex);
} catch (Exception ex) {
Logger.getLogger(RunServer.class.getName()).log(Level.SEVERE, null, ex);
}
Thread.sleep(time1bis);
}}.start();
}
public static void main(String[] args) throws Exception {
RunServer run=new RunServer(new TargetRouter ("10.53.3.150", "INTERNET@orange", "OrangeTunisie", "ge-1/1/9.1074"));
}
} |
Partager