Tunnel: Add a State factory method
Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
d645d69847
commit
ec81014c4e
@ -129,7 +129,11 @@ public class Tunnel extends BaseObservable implements Keyed<String> {
|
|||||||
public enum State {
|
public enum State {
|
||||||
DOWN,
|
DOWN,
|
||||||
TOGGLE,
|
TOGGLE,
|
||||||
UP
|
UP;
|
||||||
|
|
||||||
|
public static State of(final boolean running) {
|
||||||
|
return running ? UP : DOWN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Statistics extends BaseObservable {
|
public static class Statistics extends BaseObservable {
|
||||||
|
Loading…
Reference in New Issue
Block a user