|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanon.infoservice.AbstractDatabaseEntry
infoservice.tor.TorDirectoryServer
public class TorDirectoryServer
This is the implementation for an entry in the tor directory server database.
| Field Summary | |
|---|---|
private boolean |
m_bUserDefined
Stores if this Entry was user defined and not automatic retrieved |
private long |
m_creationTimeStamp
Stores the time when this TorDirectoryServer was created. |
private java.lang.String |
m_id
Stores the ID of this TOR directory server. |
private TorDirectoryServerUrl |
m_url
Stores the information how we can reach the directory server. |
| Fields inherited from class anon.infoservice.AbstractDatabaseEntry |
|---|
XML_LAST_UPDATE |
| Constructor Summary | |
|---|---|
TorDirectoryServer(TorDirectoryServerUrl a_url,
long a_timeValid,
boolean a_userDefined)
Creates a new TorDirectoryServer entry. |
|
| Method Summary | |
|---|---|
byte[] |
downloadCompressedTorNodesInformation()
This method connects to the tor directory server and downloads the tor nodes list. |
java.lang.String |
getId()
Returns an ID for this TorDirectoryServer. |
long |
getLastUpdate()
Returns the time in milliseconds when this db entry was created from the origin instance. |
long |
getVersionNumber()
Returns the time when this TorDirectoryServer was created. |
boolean |
isUserDefined()
Returns if this torDirectory Server was user defined |
| Methods inherited from class anon.infoservice.AbstractDatabaseEntry |
|---|
getCreationTime, getExpireTime, isNewerThan, resetCreationTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private TorDirectoryServerUrl m_url
private java.lang.String m_id
private long m_creationTimeStamp
private boolean m_bUserDefined
| Constructor Detail |
|---|
public TorDirectoryServer(TorDirectoryServerUrl a_url,
long a_timeValid,
boolean a_userDefined)
a_url - The URL where we can reach the directory server (host, port and filename).a_timeValide - The period this TorDirectoryServer entry is valid and not outdated. The
interval is given in milliseconds.a_userDefined - Whether this TorDirectoryServer was defined in the config file (true)
or was obtained via the list of running TOR directory servers (false).
This is important, because user-defined TOR directory servers shall not
be overwritten by one, we have obtained via the TOR directory server
list.| Method Detail |
|---|
public byte[] downloadCompressedTorNodesInformation()
public java.lang.String getId()
getId in class AbstractDatabaseEntrypublic long getVersionNumber()
getVersionNumber in class AbstractDatabaseEntrypublic long getLastUpdate()
AbstractDatabaseEntry
getLastUpdate in class AbstractDatabaseEntrypublic boolean isUserDefined()
isUserDefined in class AbstractDatabaseEntry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||