java.lang.Object
org.klomp.snark.web.I2PSnarkConfigure
Renders the three forms of the /configure page - main settings, torrent creation filters, and tracker management - and applies submitted settings back to SnarkManager. Extracted wholesale from I2PSnarkServlet; bodies are verbatim moves qualified for servlet access via
srv.Constructor Summary
ConstructorsConstructorDescriptionBind to the servlet whose protected helpers and settings this renderer calls.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidParses the configuration form POST parameters and applies them via SnarkManager.(package private) voidwriteConfigForm(PrintWriter out, HttpServletRequest req) Writes the HTML configuration form with all I2PSnark settings.(package private) voidWrites the HTML form for managing torrent creation file filters.(package private) voidwriteTrackerForm(PrintWriter out, HttpServletRequest req) Writes the HTML form for managing trackers with optimized string building.
Constructor Details
I2PSnarkConfigure
I2PSnarkConfigure(I2PSnarkServlet srv) Bind to the servlet whose protected helpers and settings this renderer calls.- Parameters:
srv- the owning servlet, reached for its manager, context path and translation
Method Details
writeConfigForm
Writes the HTML configuration form with all I2PSnark settings.- Parameters:
out- the PrintWriter to write the HTML outputreq- the HTTP request containing query parameters- Throws:
IOException- if an I/O error occurs during writing
writeTorrentCreateFilterForm
Writes the HTML form for managing torrent creation file filters.- Parameters:
out- the PrintWriter to which the HTML output will be writtenreq- the HttpServletRequest containing the current request parameters- Throws:
IOException- if an I/O error occurs while writing to the output stream
writeTrackerForm
Writes the HTML form for managing trackers with optimized string building. Minimizes append() calls by batching HTML fragments, and caches collections for efficient lookups.- Parameters:
out- the PrintWriter to which the HTML output will be writtenreq- the HttpServletRequest containing the current request parameters- Throws:
IOException- if an I/O error occurs while writing to the output stream
applySettings
Parses the configuration form POST parameters and applies them via SnarkManager.- Parameters:
req- the configure-page POST request