java.lang.Object
org.klomp.snark.web.I2PSnarkServlet.FooterContext
- Enclosing class:
I2PSnarkServlet
Aggregated footer state, replacing a twelve-parameter signature. Package-visible for testing.
Field Summary
FieldsModifier and TypeFieldDescription(package private) final DHTThe DHT for the debug row, null when DHT is disabled.(package private) final booleanAt least one listed torrent has a connected peer.(package private) final booleanThe router is connected to the I2P network.(package private) final booleanAt least one listed torrent has a non-zero upload rate.(package private) final booleanNo torrents are loaded.(package private) final StringThe peer parameter controlling peer display, may be null.(package private) final booleanRunning without a parent I2P router.(package private) final long[]Rate and transfer counters indexed by the STAT_* constants.(package private) final intNumber of torrents on the page.(package private) final longSummed ETA of the listed torrents in seconds, 0 if not computable.Constructor Summary
ConstructorsConstructorDescriptionFooterContext(long[] stats, long totalETA, int total, boolean isConnected, boolean noSnarks, boolean hasPeers, boolean isUploading, DHT dht, boolean standalone, String peerParam) Collects the values the footer renders, so callers do not pass twelve arguments.Method Summary
Field Details
stats
final long[] statsRate and transfer counters indexed by the STAT_* constants.totalETA
final long totalETASummed ETA of the listed torrents in seconds, 0 if not computable.total
final int totalNumber of torrents on the page.isConnected
final boolean isConnectedThe router is connected to the I2P network.noSnarks
final boolean noSnarksNo torrents are loaded.hasPeers
final boolean hasPeersAt least one listed torrent has a connected peer.isUploading
final boolean isUploadingAt least one listed torrent has a non-zero upload rate.dht
The DHT for the debug row, null when DHT is disabled.standalone
final boolean standaloneRunning without a parent I2P router.peerParam
The peer parameter controlling peer display, may be null.
Constructor Details
FooterContext
FooterContext(long[] stats, long totalETA, int total, boolean isConnected, boolean noSnarks, boolean hasPeers, boolean isUploading, DHT dht, boolean standalone, String peerParam) Collects the values the footer renders, so callers do not pass twelve arguments.- Parameters:
stats- rate and transfer counters indexed by the STAT_* constantstotalETA- summed ETA of the listed torrents in secondstotal- number of torrents on the pageisConnected- the router is connected to the I2P networknoSnarks- no torrents are loadedhasPeers- at least one listed torrent has a connected peerisUploading- at least one listed torrent has a non-zero upload ratedht- the DHT for the debug row, null when disabledstandalone- running without a parent I2P routerpeerParam- the peer parameter controlling peer display, may be null