public class NodeList
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
NODELIST_BUILDING |
static int |
NODELIST_BUILT |
static int |
NODELIST_FAILED |
static int |
NODELIST_IDLE |
static int |
NODELIST_TERMINATED |
Constructor and Description |
---|
NodeList(java.lang.String filepath,
java.lang.String exitfavourites,
java.lang.String guardfavouritesfile) |
Modifier and Type | Method and Description |
---|---|
void |
addBridge(java.lang.String bridgedata)
Add newly learned bridge to nodelist
|
void |
clearBridges()
Clear any learned bridges
|
java.lang.String |
filterRouterInfo(java.util.ArrayList<java.lang.String> alInfo,
java.lang.String field) |
int |
getCurrentStatus()
Get the process status
|
java.util.ArrayList<java.lang.String> |
getExitNodes(boolean all,
boolean omitfailednodes)
Get a list of exitnodes, if all is false then it returns only favourited
nodes, if omitfailednodes is true then don't include nodes that failed
testing
|
java.lang.String |
getExitNodesAsString(boolean all,
boolean omitfailednodes)
Get a string of comma separated exitnodes, if all is false then it
returns only favourited nodes, if omitfailednodes is true then don't
include nodes that failed testing
|
java.lang.String |
getGuardFavouritesAsCSV()
Get guard favourites
|
java.util.ArrayList<java.lang.String> |
getGuardNodes()
Get a list of all guard nodes guard nodes
|
NodeItem |
getNode(java.lang.String key)
Get node item from its fingerprint
|
int |
getNumberOfFavs()
Get the number of active favourites
|
java.util.ArrayList<java.lang.String> |
getRouterDesc(java.lang.String finger) |
java.util.ArrayList<java.lang.String> |
getRouterStatus(java.lang.String finger) |
java.lang.String[] |
getValidatedCountries()
Gets validated countries, a valid country is any country with active exit
nodes
|
java.lang.String[] |
getValidatedCountryCodes()
Gets validated country codes, a valid country is any country with active
exit nodes
|
void |
refreshExitTableModel(java.lang.String isocountry)
Update the table model based on supplied country
|
void |
refreshGuardTableModel()
Update the guard node table model
|
void |
refreshNodelist(TorController tc)
Generate the nodelist
|
void |
saveExitFavourites()
Save exit node whitelist
|
int |
saveGuardWhitelist()
Save exit node blacklist
|
void |
setExitNodeTableModel(ExitNodeTableModel entm)
Set the exit node view table model
|
void |
setGuardNodeTableModel(GuardNodeTableModel gntm)
Set the guard node view table model
|
void |
terminate()
Ensures any threaded actions will terminate themselves
|
public static final int NODELIST_IDLE
public static final int NODELIST_BUILDING
public static final int NODELIST_BUILT
public static final int NODELIST_FAILED
public static final int NODELIST_TERMINATED
public NodeList(java.lang.String filepath, java.lang.String exitfavourites, java.lang.String guardfavouritesfile)
public final NodeItem getNode(java.lang.String key)
key
- or fingerprintpublic java.util.ArrayList<java.lang.String> getRouterDesc(java.lang.String finger)
public java.util.ArrayList<java.lang.String> getRouterStatus(java.lang.String finger)
public java.lang.String filterRouterInfo(java.util.ArrayList<java.lang.String> alInfo, java.lang.String field)
public final int getCurrentStatus()
public final void refreshNodelist(TorController tc)
tc
- public void addBridge(java.lang.String bridgedata)
bridgedata
- public void clearBridges()
public final java.lang.String[] getValidatedCountries()
public final java.lang.String[] getValidatedCountryCodes()
public final void setGuardNodeTableModel(GuardNodeTableModel gntm)
gntm
- public final void setExitNodeTableModel(ExitNodeTableModel entm)
entm
- public final java.util.ArrayList<java.lang.String> getExitNodes(boolean all, boolean omitfailednodes)
all
- omitfailednodes
- public final java.lang.String getExitNodesAsString(boolean all, boolean omitfailednodes)
all
- omitfailednodes
- public final java.util.ArrayList<java.lang.String> getGuardNodes()
public final java.lang.String getGuardFavouritesAsCSV()
public final void refreshGuardTableModel()
public final void refreshExitTableModel(java.lang.String isocountry)
isocountry
- in the format "GB,Great Britain"public int getNumberOfFavs()
public final void terminate()
public void saveExitFavourites()
public int saveGuardWhitelist()