1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.rice.test; |
17 |
|
|
18 |
|
import org.kuali.rice.core.api.lifecycle.Lifecycle; |
19 |
|
import org.mortbay.jetty.Server; |
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
@author |
26 |
|
@since |
27 |
|
|
|
|
| 0% |
Uncovered Elements: 20 (20) |
Complexity: 7 |
Complexity Density: 0.7 |
|
28 |
|
public abstract class BaseTestServer implements Lifecycle { |
29 |
|
|
30 |
|
private Server server; |
31 |
|
|
32 |
|
protected abstract Server createServer(); |
33 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
34 |
0
|
public Server getServer() {... |
35 |
0
|
return this.server; |
36 |
|
} |
37 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
38 |
0
|
public void start() throws Exception {... |
39 |
0
|
this.server = createServer(); |
40 |
0
|
if (this.server == null) { |
41 |
0
|
throw new RuntimeException("Server not successfully created for class: " + getClass().getName()); |
42 |
|
} |
43 |
0
|
this.server.start(); |
44 |
|
} |
45 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
46 |
0
|
public void stop() throws Exception {... |
47 |
0
|
if (this.server != null) { |
48 |
0
|
this.server.stop(); |
49 |
|
} |
50 |
|
} |
51 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
52 |
0
|
public boolean isStarted() {... |
53 |
0
|
if (this.server == null) { |
54 |
0
|
return false; |
55 |
|
} |
56 |
0
|
return this.server.isStarted(); |
57 |
|
} |
58 |
|
} |