public class RelayImpl extends BaseRelayImpl implements Relay
Constructor and Description |
---|
RelayImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
drawBadgeSpecifics(java.awt.Graphics2D g2) |
java.util.List<java.lang.String> |
getAllegedFamily()
Get a list of relays that are not in an effective, mutual family
relationship with this relay.
|
java.lang.String |
getAsName()
Get the AS name as found by Onionoo in an AS database by resolving the
relay's first onion-routing IP address.
|
java.lang.String |
getAsNumber()
Get the AS number as found by Onionoo in an AS database by resolving the
relay's first onion-routing IP address.
|
java.lang.Long |
getBandwidthBurst()
Get the bandwidth that this relay is willing to sustain in very short
intervals.
|
java.lang.Long |
getBandwidthRate()
Get the average bandwidth that this relay is willing to sustain over long
periods.
|
java.lang.String |
getCityName()
Get the city name as found by Onionoo in a GeoIP database by resolving the
relay's first onion-routing IP address.
|
java.lang.Long |
getConsensusWeight()
Get the weight assigned to this relay by the directory authorities that
clients use in their path selection algorithm.
|
java.lang.Double |
getConsensusWeightFraction()
Get the fraction of this relay's consensus weight compared to the sum of
all consensus weights in the network.
|
java.lang.String |
getContact()
Get the contact address of the relay operator as configured by the relay
operator.
|
java.lang.String |
getCountry()
Get the country code as found by Onionoo in a GeoIP database by resolving
the relay's first onion-routing IP address.
|
java.lang.String |
getCountryName()
Get the country name as found by Onionoo in a GeoIP database by resolving
the relay's first onion-routing IP address.
|
java.lang.String |
getDirAddress()
Get the IPv4 address and TCP port where the relay accepts directory
connections.
|
java.util.List<java.lang.String> |
getEffectiveFamily()
Get a list of relays that are in an effective, mutual family relationship
with this relay.
|
java.util.List<java.lang.String> |
getExitAddresses()
Get a list of IPv4 or IPv6 addresses that the relay used to exit to the
Internet in the past 24 hours.
|
java.util.List<java.lang.String> |
getExitPolicy()
Get a list of exit-policy lines.
|
java.util.Map<java.lang.String,java.lang.String> |
getExitPolicySummary()
Get a summary version of the relay's exit policy containing a dictionary
with either an "accept" or a "reject" element.
|
java.util.Map<java.lang.String,java.lang.String> |
getExitPolicyV6Summary()
Get a summary version of the relay's IPv6 exit policy containing a
dictionary with either an "accept" or a "reject" element.
|
java.lang.Double |
getExitProbability()
Probability of this relay to be selected for the exit position.
|
java.lang.Double |
getGuardProbability()
Get the Probability of the relay to be selected for the guard position.
|
java.lang.String |
getHostName()
Get the host name as found by Onionoo in a reverse DNS lookup of the relay
IP address.
|
java.util.List<java.lang.String> |
getIndirectFamily()
Get a list of relays that are not in an effective, mutual family
relationship with this relay but that can be reached by following
effective, mutual family relationships starting at this relay.
|
java.time.ZonedDateTime |
getLastChangedAddressOrPort()
Get the time when the relay last stopped announcing an IPv4 or IPv6 address
or TCP port where it previously accepted onion-routing or directory
connections.
|
java.lang.Double |
getLatitude()
Get the latitude as found by Onionoo in a GeoIP database by resolving the
relay's first onion-routing IP address.
|
java.lang.Double |
getLongitude()
Get the longitude as found by Onionoo in a GeoIP database by resolving the
relay's first onion-routing IP address.
|
java.lang.Boolean |
getMeasured()
Get whether or not the consensus weight of this relay is based on a
threshold of 3 or more measurements by Tor bandwidth authorities.
|
java.lang.Double |
getMiddleProbability()
Get the probability of this relay to be selected for the middle position.
|
java.lang.Long |
getObservedBandwidth()
Get the bandwidth estimate of the capacity this relay can handle.
|
java.lang.String |
getRegionName()
Get the region name as found by Onionoo in a GeoIP database by resolving
the relay's first onion-routing IP address.
|
java.lang.String |
humanString(java.lang.Boolean withAtlasUrl)
Returns a human readable string with interesting information about the
relay.
|
java.lang.Boolean |
isHibernating()
Get whether or not this relay indicated that it is hibernating in its last
known server descriptor.
|
java.lang.Boolean |
isRecommendedVersion()
Get whether or not the Tor software version of this relay is recommended by
the directory authorities.
|
void |
setAllegedFamily(java.util.List<java.lang.String> allegedFamily) |
void |
setAsName(java.lang.String asName) |
void |
setAsNumber(java.lang.String asNumber) |
void |
setBandwidthBurst(java.lang.Long bandwidthBurst) |
void |
setBandwidthRate(java.lang.Long bandwidthRate) |
void |
setCityName(java.lang.String cityName) |
void |
setConsensusWeight(java.lang.Long consensusWeight) |
void |
setConsensusWeightFraction(java.lang.Double consensusWeightFraction) |
void |
setContact(java.lang.String contact) |
void |
setCountry(java.lang.String country) |
void |
setCountryName(java.lang.String countryName) |
void |
setDirAddress(java.lang.String dirAddress) |
void |
setEffectiveFamily(java.util.List<java.lang.String> effectiveFamily) |
void |
setExitAddresses(java.util.List<java.lang.String> exitAddresses) |
void |
setExitPolicy(java.util.List<java.lang.String> exitPolicy) |
void |
setExitPolicySummary(java.util.Map<java.lang.String,java.lang.String> map) |
void |
setExitPolicyV6Summary(java.util.Map<java.lang.String,java.lang.String> map) |
void |
setExitProbability(java.lang.Double exitProbability) |
void |
setGuardProbability(java.lang.Double guardProbability) |
void |
setHibernating(java.lang.Boolean hibernating) |
void |
setHostName(java.lang.String hostName) |
void |
setIndirectFamily(java.util.List<java.lang.String> indirectFamily) |
void |
setLastChangedAddressOrPort(java.lang.String lastChangedAddressOrPort) |
void |
setLatitude(java.lang.Double latitude) |
void |
setLongitude(java.lang.Double longitude) |
void |
setMeasured(java.lang.Boolean measured) |
void |
setMiddleProbability(java.lang.Double middleProbability) |
void |
setObservedBandwidth(java.lang.Long observedBandwidth) |
void |
setRecommendedVersion(java.lang.Boolean recommendedVersion) |
void |
setRegionName(java.lang.String regionName) |
java.lang.String |
toString()
Provides a string representation of a RelayDetails object, including the
fingerprint and nickname of the relay.
|
drawBadgeBasicDetails, drawBadgeFlags, generateBadge, getAdvertisedBandwidth, getFingerprint, getFirstSeen, getFlags, getFlagStrings, getLastRestarted, getLastSeen, getNickname, getOrAddresses, getPlatform, isRunning, setAdvertisedBandwidth, setFingerprint, setFirstSeen, setFlags, setLastRestarted, setLastSeen, setNickname, setOrAddresses, setPlatform, setRunning
public java.util.List<java.lang.String> getExitAddresses()
Relay
getExitAddresses
in interface Relay
public java.lang.String getDirAddress()
Relay
getDirAddress
in interface Relay
public java.time.ZonedDateTime getLastChangedAddressOrPort()
Relay
getLastChangedAddressOrPort
in interface Relay
public java.lang.Boolean isHibernating()
Relay
isHibernating
in interface Relay
public java.lang.String getCountry()
Relay
getCountry
in interface Relay
Relay.getCountryName()
public java.lang.String getCountryName()
Relay
getCountryName
in interface Relay
Relay.getRegionName()
,
Relay.getCityName()
public java.lang.String getRegionName()
Relay
getRegionName
in interface Relay
Relay.getCountryName()
,
Relay.getCityName()
public java.lang.String getCityName()
Relay
getCityName
in interface Relay
Relay.getCountryName()
,
Relay.getRegionName()
public java.lang.Double getLatitude()
Relay
getLatitude
in interface Relay
Relay.getLongitude()
public java.lang.Double getLongitude()
Relay
getLongitude
in interface Relay
Relay.getLatitude()
public java.lang.String getAsNumber()
Relay
getAsNumber
in interface Relay
Relay.getAsName()
public java.lang.String getAsName()
Relay
getAsName
in interface Relay
Relay.getAsNumber()
public java.lang.Long getConsensusWeight()
Relay
getConsensusWeight
in interface Relay
Relay.getConsensusWeightFraction()
public java.lang.String getHostName()
Relay
getHostName
in interface Relay
public java.lang.Long getBandwidthRate()
Relay
getBandwidthRate
in interface Relay
public java.lang.Long getBandwidthBurst()
Relay
getBandwidthBurst
in interface Relay
public java.lang.Long getObservedBandwidth()
Relay
getObservedBandwidth
in interface Relay
public java.util.List<java.lang.String> getExitPolicy()
Relay
getExitPolicy
in interface Relay
public java.util.Map<java.lang.String,java.lang.String> getExitPolicySummary()
Relay
getExitPolicySummary
in interface Relay
public java.util.Map<java.lang.String,java.lang.String> getExitPolicyV6Summary()
Relay
getExitPolicyV6Summary
in interface Relay
public java.lang.String getContact()
Relay
getContact
in interface Relay
public java.lang.Boolean isRecommendedVersion()
Relay
isRecommendedVersion
in interface Relay
BaseRelay.getPlatform()
public java.util.List<java.lang.String> getEffectiveFamily()
Relay
getEffectiveFamily
in interface Relay
Relay.getAllegedFamily()
,
Relay.getIndirectFamily()
public java.util.List<java.lang.String> getAllegedFamily()
Relay
getAllegedFamily
in interface Relay
Relay.getEffectiveFamily()
,
Relay.getIndirectFamily()
public java.util.List<java.lang.String> getIndirectFamily()
Relay
getIndirectFamily
in interface Relay
Relay.getEffectiveFamily()
,
Relay.getAllegedFamily()
public java.lang.Double getConsensusWeightFraction()
Relay
getConsensusWeightFraction
in interface Relay
Relay.getConsensusWeight()
public java.lang.Double getGuardProbability()
Relay
getGuardProbability
in interface Relay
Relay.getMiddleProbability()
,
Relay.getExitProbability()
public java.lang.Double getMiddleProbability()
Relay
getMiddleProbability
in interface Relay
Relay.getGuardProbability()
,
Relay.getExitProbability()
public java.lang.Double getExitProbability()
Relay
getExitProbability
in interface Relay
Relay.getGuardProbability()
,
Relay.getMiddleProbability()
public java.lang.Boolean getMeasured()
Relay
getMeasured
in interface Relay
Relay.getConsensusWeight()
public void setExitAddresses(java.util.List<java.lang.String> exitAddresses)
exitAddresses
- the exit_addresses to setpublic void setDirAddress(java.lang.String dirAddress)
dirAddress
- the dir_address to setpublic void setLastChangedAddressOrPort(java.lang.String lastChangedAddressOrPort)
lastChangedAddressOrPort
- the last_changed_address_or_port to setpublic void setHibernating(java.lang.Boolean hibernating)
hibernating
- the hibernating to setpublic void setCountry(java.lang.String country)
country
- the country to setpublic void setCountryName(java.lang.String countryName)
countryName
- the country_name to setpublic void setRegionName(java.lang.String regionName)
regionName
- the region_name to setpublic void setCityName(java.lang.String cityName)
cityName
- the city_name to setpublic void setLatitude(java.lang.Double latitude)
latitude
- the latitude to setpublic void setLongitude(java.lang.Double longitude)
longitude
- the longitude to setpublic void setAsNumber(java.lang.String asNumber)
asNumber
- the as_number to setpublic void setAsName(java.lang.String asName)
asName
- the as_name to setpublic void setConsensusWeight(java.lang.Long consensusWeight)
consensusWeight
- the consensus_weight to setpublic void setHostName(java.lang.String hostName)
hostName
- the host_name to setpublic void setBandwidthRate(java.lang.Long bandwidthRate)
bandwidthRate
- the bandwidth_rate to setpublic void setBandwidthBurst(java.lang.Long bandwidthBurst)
bandwidthBurst
- the bandwidth_burst to setpublic void setObservedBandwidth(java.lang.Long observedBandwidth)
observedBandwidth
- the observed_bandwidth to setpublic void setExitPolicy(java.util.List<java.lang.String> exitPolicy)
exitPolicy
- the exit_policy to setpublic void setExitPolicySummary(java.util.Map<java.lang.String,java.lang.String> map)
map
- the exit_policy_summary to setpublic void setExitPolicyV6Summary(java.util.Map<java.lang.String,java.lang.String> map)
map
- the exit_policy_v6_summary to setpublic void setContact(java.lang.String contact)
contact
- the contact to setpublic void setRecommendedVersion(java.lang.Boolean recommendedVersion)
recommendedVersion
- the recommended_version to setpublic void setEffectiveFamily(java.util.List<java.lang.String> effectiveFamily)
effectiveFamily
- the effective_family to setpublic void setAllegedFamily(java.util.List<java.lang.String> allegedFamily)
allegedFamily
- the alleged_family to setpublic void setIndirectFamily(java.util.List<java.lang.String> indirectFamily)
indirectFamily
- the indirect_family to setpublic void setConsensusWeightFraction(java.lang.Double consensusWeightFraction)
consensusWeightFraction
- the consensus_weight_fraction to setpublic void setGuardProbability(java.lang.Double guardProbability)
guardProbability
- the guard_probability to setpublic void setMiddleProbability(java.lang.Double middleProbability)
middleProbability
- the middle_probability to setpublic void setExitProbability(java.lang.Double exitProbability)
exitProbability
- the exit_probability to setpublic void setMeasured(java.lang.Boolean measured)
measured
- the measured to setpublic java.lang.String toString()
<RelayDetails A53C46F5B157DD83366D45A8E99A244934A14C46 (csailmitexit)>
toString
in class java.lang.Object
public java.lang.String humanString(java.lang.Boolean withAtlasUrl)
BaseRelay
humanString
in interface BaseRelay
humanString
in class BaseRelayImpl
withAtlasUrl
- true if an atlas.torproject.org URL should be included, otherwise
falseprotected void drawBadgeSpecifics(java.awt.Graphics2D g2)
drawBadgeSpecifics
in class BaseRelayImpl