ChResult.java
1.2 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
package com.xgimi.smartscreen.confignetwork;
import java.net.InetAddress;
import java.util.concurrent.atomic.AtomicBoolean;
public class ChResult implements IChResult {
private final boolean mIsSuc;
private final String mBssid;
private final InetAddress mInetAddress;
private AtomicBoolean mIsCancelled;
/**
* Constructor of ChResult
*
* @param isSuc whether the ch task is executed suc
* @param bssid the device's bssid
* @param inetAddress the device's ip address
*/
public ChResult(boolean isSuc, String bssid, InetAddress inetAddress) {
this.mIsSuc = isSuc;
this.mBssid = bssid;
this.mInetAddress = inetAddress;
this.mIsCancelled = new AtomicBoolean(false);
}
@Override
public boolean isSuc() {
return this.mIsSuc;
}
@Override
public String getBssid() {
return this.mBssid;
}
@Override
public boolean isCancelled() {
return mIsCancelled.get();
}
public void setIsCancelled(boolean isCancelled) {
this.mIsCancelled.set(isCancelled);
}
@Override
public InetAddress getInetAddress() {
return this.mInetAddress;
}
}