java.lang.Object
net.i2p.router.web.HelperBase
net.i2p.router.web.helpers.ReseedHandler
Handler to deal with reseed requests.
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionUses the current console router context.Binds the handler to the router context owning the reseed checker.Method Summary
Modifier and TypeMethodDescriptionprivate voidStarts a reseed when the form asks for one.voidsetReseedNonce(String nonce) StoreSession MUST be called first.voidstoreSession(HttpSession session) For form validation.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.
Field Details
_session
The session the reseed request arrives on.
Constructor Details
ReseedHandler
public ReseedHandler()Uses the current console router context.ReseedHandler
Binds the handler to the router context owning the reseed checker.- Parameters:
ctx- the router context whose reseed checker this handler triggers
Method Details
storeSession
For form validation.- Parameters:
session- the console session holding the nonce to validate later
setReseedNonce
StoreSession MUST be called first.- Parameters:
nonce- the submitted nonce, matched against the session and then the system property; a null value is ignored
requestReseed
private void requestReseed()Starts a reseed when the form asks for one.