-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTask1.java
More file actions
61 lines (38 loc) · 1.15 KB
/
Task1.java
File metadata and controls
61 lines (38 loc) · 1.15 KB
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
package chalba;
import org.sqlite.jdbc4.*;
import skd.chalba.common.*;
import skd.chalba.requests.*;
import skd.chalba.runner.*;
import skd.chalba.interfaces.*;
/**
* @author sapan.dang
*/
@ThreadCount(10)
@ThreadSpawnDelay(100)
public class Task1 extends Task {
public Task1(TaskParams taskParams)
{
System.out.println("Started "+taskParams._ThreadIndex);
System.out.println("ThreadName "+taskParams._TaskName);
}
@Override
public void run() {
super.run();
System.out.println("Started thread...");
// ResponseData res = requests.get("https://www.buglens.com");
// if (res != null) {
// System.out.println("ResponseCode " + res.code);
// }
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
requests.get("https://www.google.com", new AsyncResponseCallback() {
@Override
public void onResponse(ResponseData arg0) {
System.out.println(" "+arg0.code);
}
});
}
}