public class RouterDescriptorImpl extends Object implements RouterDescriptor
Descriptor.CacheLocation| Constructor and Description |
|---|
RouterDescriptorImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsSingleHopExits()
Return true if this router allows single-hop circuits to make exit connections.
|
boolean |
cachesExtraInfo()
Returns true if this router is a directory cache that provides extra-info
documents.
|
boolean |
equals(Object o) |
boolean |
exitPolicyAccepts(int port)
Return true if the exit policy of this router accepts most connections
to the specified destination port.
|
boolean |
exitPolicyAccepts(IPv4Address address,
int port)
Return true if the exit policy of this router permits connections
to the specified destination endpoint.
|
IPv4Address |
getAddress()
Return the IPv4 address of this router.
|
int |
getAverageBandwidth()
Returns the volume of traffic in bytes per second that this router
is willing to sustain over long periods.
|
int |
getBodyLength() |
int |
getBurstBandwidth()
Returns the volume of traffic in bytes per second that this router
is willing to sustain in very short intervals.
|
Descriptor.CacheLocation |
getCacheLocation() |
String |
getContact()
Return a string which describes how to contact the server's administrator.
|
HexDigest |
getDescriptorDigest() |
int |
getDirectoryPort()
Return the port on which this router provides directory related
HTTP connections, or 0 if this node does not provide directory
services.
|
ExitPolicy |
getExitPolicy() |
HexDigest |
getExtraInfoDigest()
Return a digest of this router's extra-info document, or null if not
available.
|
Set<String> |
getFamilyMembers() |
HexDigest |
getFingerprint()
Return a fingerprint of the public key of this router.
|
TorPublicKey |
getIdentityKey()
Return the long-term identity and signing public key for this
router.
|
long |
getLastListed() |
String |
getNickname()
Returns the nickname of this router.
|
byte[] |
getNTorOnionKey() |
int |
getObservedBandwidth()
Returns the volume of traffic in bytes per second that this router
is estimated to be able to sustain.
|
TorPublicKey |
getOnionKey()
Return the public key used to encrypt EXTEND cells while establishing
a circuit through this router.
|
String |
getPlatform()
Return a human-readable string describing the system on which this router
is running, including possibly the operating system version and Tor
implementation version.
|
Timestamp |
getPublishedTime()
Return the time this descriptor was generated.
|
ByteBuffer |
getRawDocumentBytes() |
String |
getRawDocumentData() |
BandwidthHistory |
getReadHistory() |
int |
getRouterPort()
Return the port on which this node accepts TLS connections
for the main OR protocol, or 0 if no router service is advertised.
|
int |
getUptime()
Return the number of seconds this router has been running.
|
BandwidthHistory |
getWriteHistory() |
int |
hashCode() |
boolean |
isHibernating()
Return true if this router is currently hibernating and not suitable for
building new circuits.
|
boolean |
isHiddenServiceDirectory()
Returns true if this router stores and serves hidden service descriptors.
|
boolean |
isNewerThan(RouterDescriptor other)
Compare two router descriptors and return true if this router descriptor was published
at a later time than the
other descriptor. |
boolean |
isValidDocument() |
void |
print() |
void |
setAddress(IPv4Address address) |
void |
setCacheLocation(Descriptor.CacheLocation location) |
void |
setLastListed(long timestamp) |
void |
setNickname(String nickname) |
void |
setOnionKey(TorPublicKey key) |
void |
setRouterPort(int port) |
boolean |
supportsEventDNS()
Return true if this router is running a version of Tor which supports the
newer enhanced DNS logic.
|
String |
toString() |
public void setNickname(String nickname)
public void setAddress(IPv4Address address)
public void setRouterPort(int port)
public void setOnionKey(TorPublicKey key)
public boolean isValidDocument()
isValidDocument in interface Documentpublic String getNickname()
RouterDescriptorgetNickname in interface RouterDescriptorpublic IPv4Address getAddress()
DescriptorgetAddress in interface Descriptorpublic int getRouterPort()
DescriptorgetRouterPort in interface Descriptorpublic int getDirectoryPort()
RouterDescriptorgetDirectoryPort in interface RouterDescriptorpublic int getAverageBandwidth()
RouterDescriptorgetAverageBandwidth in interface RouterDescriptorpublic int getBurstBandwidth()
RouterDescriptorgetBurstBandwidth in interface RouterDescriptorpublic int getObservedBandwidth()
RouterDescriptorgetObservedBandwidth in interface RouterDescriptorpublic String getPlatform()
RouterDescriptorgetPlatform in interface RouterDescriptorpublic HexDigest getFingerprint()
RouterDescriptorgetFingerprint in interface RouterDescriptorpublic int getUptime()
RouterDescriptorgetUptime in interface RouterDescriptorpublic TorPublicKey getOnionKey()
DescriptorgetOnionKey in interface Descriptorpublic byte[] getNTorOnionKey()
getNTorOnionKey in interface Descriptorpublic TorPublicKey getIdentityKey()
RouterDescriptorgetIdentityKey in interface RouterDescriptorpublic String getContact()
RouterDescriptorgetContact in interface RouterDescriptorpublic boolean isHibernating()
RouterDescriptorisHibernating in interface RouterDescriptorpublic boolean cachesExtraInfo()
RouterDescriptorcachesExtraInfo in interface RouterDescriptorpublic boolean allowsSingleHopExits()
RouterDescriptorallowsSingleHopExits in interface RouterDescriptorpublic Timestamp getPublishedTime()
RouterDescriptorgetPublishedTime in interface RouterDescriptorpublic void print()
public boolean exitPolicyAccepts(IPv4Address address, int port)
DescriptorexitPolicyAccepts in interface Descriptoraddress - The IPv4 address of the destination.port - The destination port.public boolean exitPolicyAccepts(int port)
DescriptorexitPolicyAccepts in interface Descriptorport - The destination port.public HexDigest getExtraInfoDigest()
RouterDescriptorgetExtraInfoDigest in interface RouterDescriptorpublic boolean isHiddenServiceDirectory()
RouterDescriptorisHiddenServiceDirectory in interface RouterDescriptorpublic Set<String> getFamilyMembers()
getFamilyMembers in interface Descriptorpublic boolean supportsEventDNS()
RouterDescriptorsupportsEventDNS in interface RouterDescriptorpublic BandwidthHistory getReadHistory()
public BandwidthHistory getWriteHistory()
public boolean isNewerThan(RouterDescriptor other)
RouterDescriptorother descriptor.isNewerThan in interface RouterDescriptorother - Another router descriptor to compare.otherpublic HexDigest getDescriptorDigest()
getDescriptorDigest in interface Descriptorpublic String getRawDocumentData()
getRawDocumentData in interface Documentpublic ByteBuffer getRawDocumentBytes()
getRawDocumentBytes in interface Documentpublic ExitPolicy getExitPolicy()
getExitPolicy in interface RouterDescriptorpublic void setLastListed(long timestamp)
setLastListed in interface Descriptorpublic long getLastListed()
getLastListed in interface Descriptorpublic void setCacheLocation(Descriptor.CacheLocation location)
setCacheLocation in interface Descriptorpublic Descriptor.CacheLocation getCacheLocation()
getCacheLocation in interface Descriptorpublic int getBodyLength()
getBodyLength in interface DescriptorCopyright © 2015. All rights reserved.