java.lang.Object
org.klomp.snark.web.I2PSnarkServlet.RowContext
- Enclosing class:
I2PSnarkServlet
Per-row and per-render inputs for
I2PSnarkServlet.displaySnark(PrintWriter, I2PSnarkServlet.RowContext, StringBuilder), replacing an eighteen-parameter signature. Immutable view over render-scope state.Field Summary
FieldsModifier and TypeFieldDescription(package private) final Map<ByteArray, I2PSnarkServlet.BadgeInfo> Per-render cache of badge lookups keyed by info hash, shared by every RowContext of the current response; single-threaded.(package private) final booleanWhether the user may change this torrent.(package private) final StringActive filter value, "" for none; never null.(package private) final intZero-based index within the current page; drives parity styling.(package private) final booleanWhether thin spaces are omitted in numbers.(package private) final booleanWhether the peer list is shown.(package private) final SnarkThe torrent whose row is being drawn.(package private) final StringNormalized sort parameter, or null.(package private) final long[]Render-scope accumulator; reference is shared, contents mutate.(package private) final StringShort unique action token stamped on this row's form controls, resolved once by the caller from the render-scope map built byActionTokens.mint(Collection); falls back to the full b64 name.Constructor Summary
ConstructorsConstructorDescriptionRowContext(Snark snark, int index, boolean showPeers, long[] stats, boolean noThinsp, boolean canWrite, String filterParam, String sortParam, Map<ByteArray, I2PSnarkServlet.BadgeInfo> badgeCache, String token) Holds what one download row needs.Method Summary
Field Details
snark
The torrent whose row is being drawn.index
final int indexZero-based index within the current page; drives parity styling.showPeers
final boolean showPeersWhether the peer list is shown.stats
final long[] statsRender-scope accumulator; reference is shared, contents mutate.noThinsp
final boolean noThinspWhether thin spaces are omitted in numbers.canWrite
final boolean canWriteWhether the user may change this torrent.filterParam
Active filter value, "" for none; never null.sortParam
Normalized sort parameter, or null.badgeCache
Per-render cache of badge lookups keyed by info hash, shared by every RowContext of the current response; single-threaded.token
Short unique action token stamped on this row's form controls, resolved once by the caller from the render-scope map built byActionTokens.mint(Collection); falls back to the full b64 name.
Constructor Details
RowContext
RowContext(Snark snark, int index, boolean showPeers, long[] stats, boolean noThinsp, boolean canWrite, String filterParam, String sortParam, Map<ByteArray, I2PSnarkServlet.BadgeInfo> badgeCache, String token) Holds what one download row needs.- Parameters:
snark- the download the row describesindex- the number of the rowshowPeers- true to show the peer countsstats- the stats of the rownoThinsp- true to skip the thin separatorscanWrite- true if the user may change the downloadfilterParam- the current filter parametersortParam- the current sort parameterbadgeCache- the cached badge infotoken- the security token of the form