Parallel Programming WS 2014/2015 - File LicenseTest.java
public class LicenseTest {
private static final int N = 8;
public static void main(String[] args) {
Channel servChan = new Channel();
LicenseServer serv = new LicenseServer(servChan);
serv.start();
LicenseClient[] clients = new LicenseClient[N];
for (int i = 0; i < N; i++) {
clients[i] = new LicenseClient(servChan, "User " + i);
clients[i].start();
}
try {
Thread.sleep(10000);
} catch (InterruptedException e) {}
for (int i = 0; i < N; i++) {
clients[i].stopIt();
}
serv.stopIt();
}
}
Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 19.01.2015


