|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.tor.ordescription.ORList
public final class ORList
Field Summary | |
---|---|
private int |
m_countHibernate
|
private java.util.Date |
m_datePublished
|
private java.util.Vector |
m_exitnodes
|
private java.util.Vector |
m_middlenodes
|
private java.util.Vector |
m_onionrouters
|
private java.util.Hashtable |
m_onionroutersWithNames
|
private ORListFetcher |
m_orlistFetcher
|
private MyRandom |
m_rand
|
private static java.text.DateFormat |
ms_DateFormat
|
Constructor Summary | |
---|---|
ORList(ORListFetcher fetcher)
constructor |
Method Summary | |
---|---|
int |
active()
|
void |
add(ORDescriptor ord)
add an onion rotuer |
ORDescriptor |
getByName(java.lang.String name)
gets an onion router by it's name |
ORDescriptor |
getByRandom()
selects a OR randomly (it should not hibernate) |
ORDescriptor |
getByRandom(int length)
selects a OR randomly tries to blanace the probability of exit and non-exit nodes |
ORDescriptor |
getByRandom(java.util.Vector allowedNames)
selects a OR randomly from a given list of allowed OR names |
java.util.Vector |
getList()
returns a List of all onionrouters |
ORDescriptor |
getORDescriptor(java.lang.String name)
returns a ORDescription to the given ORName |
java.util.Date |
getPublished()
gets the date when the List was pubished |
private boolean |
parseFirstDocument(byte[] document)
parses the document and creates a list with all ORDescriptions |
private boolean |
parseStatus(byte[] document,
boolean change)
parse router status |
void |
remove(java.lang.String name)
removes an onion router |
void |
setFetcher(ORListFetcher fetcher)
|
int |
size()
size of the ORList |
boolean |
updateList()
Updates the list of available ORRouters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Vector m_onionrouters
private java.util.Vector m_exitnodes
private java.util.Vector m_middlenodes
private java.util.Hashtable m_onionroutersWithNames
private MyRandom m_rand
private ORListFetcher m_orlistFetcher
private java.util.Date m_datePublished
private int m_countHibernate
private static final java.text.DateFormat ms_DateFormat
Constructor Detail |
---|
public ORList(ORListFetcher fetcher)
Method Detail |
---|
public int size()
public int active()
public void setFetcher(ORListFetcher fetcher)
public boolean updateList()
public java.util.Vector getList()
public java.util.Date getPublished()
public ORDescriptor getByName(java.lang.String name)
name
- name of the OR
public void remove(java.lang.String name)
name
- name of the ORpublic void add(ORDescriptor ord)
ord
- descriptor for routerpublic ORDescriptor getByRandom(java.util.Vector allowedNames)
orlist
- list of onionrouter names
public ORDescriptor getByRandom()
public ORDescriptor getByRandom(int length)
length
- length of the circuit
public ORDescriptor getORDescriptor(java.lang.String name)
name
- ORName
private boolean parseStatus(byte[] document, boolean change) throws java.lang.Exception
java.lang.Exception
private boolean parseFirstDocument(byte[] document) throws java.lang.Exception
strDocument
-
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |