blob: f473df57a4afb79444fc674c6f96ce8154649726 (
plain) (
blame)
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
|
package org.openslx;
import java.util.List;
import org.openslx.dnbd3.DNBD3Client;
import org.openslx.dnbd3.DNBD3Image;
import org.openslx.dnbd3.DNBD3Server;
public class Test {
public static void main(String[] args) {
try {
DNBD3Server server = new DNBD3Server();
// server.doReload();
// server.doShutdown();
System.out.println("Exported images (atime, vid, rid, file):");
System.out.println("========================================");
List<DNBD3Image> images = server.getImages();
for (DNBD3Image image : images) {
System.out.print(image.getAtime() + "\t");
System.out.print(image.getVid() + "\t");
System.out.print(image.getRid() + "\t");
System.out.print(image.getPath());
System.out.println();
}
System.out.println();
System.out.println("Number images: " + images.size());
System.out.println();
System.out.println("Connected clients (ip, file)");
System.out.println("============================");
List<DNBD3Client> clients = server.getClients();
for (DNBD3Client client : clients) {
System.out.print(client.getIp() + "\t");
System.out.print(client.getImage());
System.out.println();
}
System.out.println();
System.out.println("Number clients: " + clients.size());
System.out.println();
} catch (Exception e) {
e.printStackTrace();
}
}
}
|