public class TorNetwork
extends java.lang.Object
Constructor and Description |
---|
TorNetwork() |
Modifier and Type | Method and Description |
---|---|
MicroblogStatus |
getNetworkTweet()
Returns a tweet using a random template with a random running relay or
group of running relays.
|
java.lang.String |
getRandomAs()
Get a random AS number that has at least one relay running in the Tor
network.
|
java.lang.String |
getRandomCountry()
Get a random 2-letter country code that has at least one relay running in
the Tor network.
|
BridgeImpl |
getRandomRunningBridge()
Get a random relay from the Tor network.
|
RelayImpl |
getRandomRunningRelay()
Get a random relay from the Tor network.
|
MicroblogStatus |
getRelayTweet()
Returns a tweet using a random template with a random running relay or
group of running relays.
|
java.util.List<RelayImpl> |
getRunningRelays() |
java.util.List<RelayImpl> |
getRunningRelaysForAs()
Returns a list of running relay details for a random AS.
|
java.util.List<RelayImpl> |
getRunningRelaysForAs(java.lang.String as) |
java.util.List<RelayImpl> |
getRunningRelaysForCountry()
Returns a list of relay details for a random country.
|
java.util.List<RelayImpl> |
getRunningRelaysForCountry(java.lang.String country) |
void |
update() |
public void update()
public RelayImpl getRandomRunningRelay()
public BridgeImpl getRandomRunningBridge()
public java.lang.String getRandomCountry()
getRunningRelaysForCountry(String)
.getRunningRelaysForCountry()
,
getRunningRelaysForCountry(String)
public java.lang.String getRandomAs()
getRunningRelaysForAs(String)
.getRunningRelaysForAs()
,
getRunningRelaysForAs(String)
public java.util.List<RelayImpl> getRunningRelaysForAs()
getRunningRelaysForAs(String)
.getRunningRelaysForAs(String)
public java.util.List<RelayImpl> getRunningRelaysForAs(java.lang.String as)
public java.util.List<RelayImpl> getRunningRelaysForCountry()
getRunningRelaysForCountry(String)
.getRunningRelaysForCountry(String)
public java.util.List<RelayImpl> getRunningRelaysForCountry(java.lang.String country)
public MicroblogStatus getNetworkTweet() throws MissingInformationException
The following functions may be called to generate the tweets:
RelayTweetGenerator.generateAgeTweet(RelayImpl)
RelayTweetGenerator.generateBandwidthTweet(RelayImpl)
RelayLocationTweetGenerator.generateAsBandwidthTweet(List)
RelayLocationTweetGenerator.generateCountryBandwidthTweet(List)
BridgeTweetGenerator.generateAgeTweet(BridgeImpl)
BridgeTweetGenerator.generateBandwidthTweet(BridgeImpl)
MissingInformationException
- when information required to generate the tweet is missing from
the RelayDetails object (probably because Onionoo did not have
it)public MicroblogStatus getRelayTweet() throws MissingInformationException
The following functions may be called to generate the tweets:
RelayTweetGenerator.generateAgeTweet(RelayImpl)
RelayTweetGenerator.generateBandwidthTweet(RelayImpl)
RelayLocationTweetGenerator.generateAsBandwidthTweet(List)
RelayLocationTweetGenerator.generateCountryBandwidthTweet(List)
BridgeTweetGenerator.generateAgeTweet(BridgeImpl)
BridgeTweetGenerator.generateBandwidthTweet(BridgeImpl)
MissingInformationException
- when information required to generate the tweet is missing from
the RelayDetails object (probably because Onionoo did not have
it)public java.util.List<RelayImpl> getRunningRelays()