package org.klomp.snark.web
The I2PSnark web interface (i2psnark.war): servlets and helpers for torrent management, file browsing and configuration.
- ClassDescriptionMints and resolves short, unique action tokens for per-torrent form controls.Based on DefaultServlet from Jetty 6.1.26, heavily simplified and modified to remove all dependencies on Jetty libs.From Jetty HttpContent.java.Version helpers for the I2PSnark Bridge extension: reads the version from the manifest.json inside the bundled XPI, and compares dotted extension versions numerically so the router can tell whether the installed extension is current.Registers the browser protocol/file handler that forwards magnet links and torrent files to the I2PSnark browser API (POST /i2psnark/_add).A cancellable torrent file downloader.Renders the three forms of the /configure page - main settings, torrent creation filters, and tracker management - and applies submitted settings back to SnarkManager.Web interface servlet for I2PSnark torrent management: torrent listing and status, adding torrents by file/URL/magnet, torrent creation, peer and bandwidth management, DHT and tracker status, comments, file browsing and download, configuration, and theme/locale support.Result of building the new announce list.Parsed announce parameters from the create torrent form.Cached per-torrent values used by the status-cell destination badge: the four-character base64 destination prefix and the client identity display name, if any.Result of validating a base file for torrent creation.Immutable parameters for rendering the comments/ratings section.Snapshot read atomically from a torrent's comment set: the user's own rating, community rating count and average, and an iterator over the existing comments when any exist.Result of building the announce list.Parsed edit form parameters.Immutable context for rendering a single file row in the torrent file browser.Mutable counters for file row rendering.Aggregated footer state, replacing a twelve-parameter signature.Holds immutable mappings from MIME types and file suffixes to icon names.Sort by completeness (seeds first), then by ID.Immutable context for rendering a peer row.Peer status classification result.Per-row and per-render inputs for
I2PSnarkServlet.displaySnark(PrintWriter, I2PSnarkServlet.RowContext, StringBuilder), replacing an eighteen-parameter signature.Request-derived inputs shared by every sortable torrent-list header cell; replaces a thirteen-parameter signature.The mutually exclusive states a torrent row can display, in the evaluation order ofI2PSnarkServlet.classifyStatus(boolean, boolean, boolean, boolean, boolean, boolean, int, int, boolean, boolean).Encapsulates result of status building with HTML output and status keyword.Peer/rate activity flags scanned across one rendered page slice; drives which optional header cells render.Byte range inclusive of end points.Based on MimeTypes from Jetty 6.1.26, heavily simplified and modified to remove all dependencies on Jetty libs.Utility class for extracting MP3 metadata tags for display in the I2PSnark web interface.Validation for the numeric query strings used by the post/redirect/get pattern in the web UI.Comparators for various columns.Orders torrents by bytes downloaded.Orders torrents by download rate.Orders torrents by estimated finish time.Orders files by download priority.Orders files by bytes left to download.Orders files by size.Forward or reverse sort, but the fallback is always forward.Orders files by type.Class to precompute and efficiently sort data on a torrent file entry.Sort alphabetically in current locale, ignore case, directories first.Orders torrents by the type of their main file.Orders torrents by peer count.Orders torrents by upload-to-download ratio.Orders torrents by bytes left to download.Orders torrents by total size.Forward or reverse sort, but the fallback is always forward.Orders torrents by their download state.Sort strictly by pool number, then by status; ties fall back to the status tie-breaks.Sort alphabetically in current locale, ignore case, ignore leading articles such as "the" if the pattern is set by setPattern().Orders torrents by bytes uploaded.Orders torrents by upload rate.