java.lang.Object
net.i2p.router.web.HelperBase
net.i2p.router.web.helpers.TunnelHelper
Helper for tunnel status page rendering and form processing. Provides tunnel summary information, status display, and configuration guidance for I2P tunnel management.
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
ConstructorsConstructorDescriptionCreate the helper; the superclass constructor sets up the request context.Method Summary
All MethodsModifier and TypeMethodDescriptionWrite the tunnel status and guide HTML into the response.booleanReport whether the console is in advanced mode.voidrenderFragment(String id) Render a single named element for the contentonly fragment mode of the local tunnels page.Methods inherited from class HelperBase
_t, _t, _t, _x, getChecked, 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.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
TunnelHelper
public TunnelHelper()Create the helper; the superclass constructor sets up the request context.
Method Details
getTunnelSummary
Write the tunnel status and guide HTML into the response.- Returns:
- the rendered tunnel status and guide, or an empty string when the rendering failed
isAdvanced
public boolean isAdvanced()Report whether the console is in advanced mode.- Overrides:
isAdvancedin classHelperBase- Returns:
- the value of the
routerconsole.advancedproperty, which enables the extra pages the full console shows
renderFragment
Render a single named element for the contentonly fragment mode of the local tunnels page.- Parameters:
id- the element id