java.lang.Object
net.i2p.router.web.HelperBase
net.i2p.router.web.helpers.SAMDebugHelper
Helper for the /samdebug page - shows SAM bridge status with rings and a session table. The page is accessible from the Debug tab when the SAM bridge is running.
Field Summary
Fields inherited from class HelperBase
_context, _log, _out, CHECKED, PROP_ADVANCED, SELECTEDModifier and TypeFieldDescriptionprotected RouterContextThe router context.protected LogThe log instance.protected WriterThe writer for output.static final StringChecked attribute for HTML checkboxes.static final StringProperty key for advanced mode.static final StringSelected attribute for HTML select options.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionprivate SAMBridgeGet the SAM bridge instance if running.Render the full SAM debug page content (rings + session table).private voidrenderSAMD(Writer out) Writes the SAM debug page's table of current connections.Methods inherited from class HelperBase
_t, _t, _t, _x, getChecked, isAdvanced, ngettext, setContextId, storeWriterModifier and TypeMethodDescriptionTranslate a string.Translate a string with a parameter.Translate a string with two parameters.static StringMark a string for extraction by xgettext and translation.protected StringgetChecked(String prop) Get the checked attribute for a boolean property.booleanCheck if advanced mode is enabled.Translate a string with plural forms (ngettext).voidsetContextId(String contextId) Configure this bean to query a particular router context.voidstoreWriter(Writer out) Store the writer for output.
Constructor Details
SAMDebugHelper
public SAMDebugHelper()Explicit no-arg constructor, as the console requires.
Method Details
getSAMDHelper
Render the full SAM debug page content (rings + session table).- Returns:
- the rendered html, or an empty string when writing to a writer
renderSAMD
Writes the SAM debug page's table of current connections.- Parameters:
out- where the page is written- Throws:
IOException- if the writer fails
getBridge
Get the SAM bridge instance if running.- Returns:
- the SAMBridge instance, or null if not running