|
@@ -1,2 +1,23 @@
|
1
|
|
-public class IDGetter {
|
|
1
|
+public class IDGetter implements Runnable{
|
|
2
|
+ private User user;
|
|
3
|
+ private YouAreEll webber;
|
|
4
|
+
|
|
5
|
+ public IDGetter(User user, YouAreEll webber) {
|
|
6
|
+ this.user = user;
|
|
7
|
+ this.webber = webber;
|
|
8
|
+ }
|
|
9
|
+
|
|
10
|
+ public void run() {
|
|
11
|
+ String results = webber.get_ids(user);
|
|
12
|
+ simulateLag();
|
|
13
|
+ SimpleShell.prettyPrintUsers(results);
|
|
14
|
+ }
|
|
15
|
+
|
|
16
|
+ private void simulateLag() {
|
|
17
|
+ try {
|
|
18
|
+ Thread.sleep(10000);
|
|
19
|
+ } catch (InterruptedException e){
|
|
20
|
+ e.printStackTrace();
|
|
21
|
+ }
|
|
22
|
+ }
|
2
|
23
|
}
|