Skip to content

Commit 1993bb0

Browse files
committed
Add setter Reacheable
1 parent b054a5d commit 1993bb0

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

api/src/main/java/fr/epsilon/api/EpsilonAPI.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ public static EpsilonAPI get() {
6565
*/
6666
public abstract EQueueModule queueModule();
6767

68+
/**
69+
* Set if server is reachable
70+
* @param value
71+
*/
72+
public abstract void setReachable(boolean value);
73+
6874
/**
6975
* Get if server is reachable
7076
*

common/src/main/java/fr/epsilon/common/Epsilon.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public class Epsilon extends EpsilonAPI {
4040

4141
private Template template;
4242

43+
private boolean reachable;
44+
4345
public Epsilon() {
4446
this(true);
4547
}
@@ -79,6 +81,8 @@ public Epsilon(boolean internal) {
7981

8082
this.instanceModule = new InstanceModule(okHttp, gson);
8183
this.queueModule = new QueueModule(okHttp, gson);
84+
85+
this.reachable = true;
8286
}
8387

8488
public static Epsilon get() {
@@ -125,8 +129,13 @@ public QueueModule queueModule() {
125129
return queueModule;
126130
}
127131

132+
@Override
133+
public void setReachable(boolean value) {
134+
this.reachable = value;
135+
}
136+
128137
@Override
129138
public boolean isReachable() {
130-
return true;
139+
return reachable;
131140
}
132141
}

0 commit comments

Comments
 (0)