Package net.i2p.router.web.helpers
Class WizardHelper
java.lang.Object
net.i2p.router.web.HelperBase
net.i2p.router.web.helpers.WizardHelper
public class WizardHelper extends HelperBase
The new user wizard.
This bean has SESSION scope so the results may be retrieved.
All necessary methods are synchronized.
- Since:
- 0.9.38
-
Field Summary
Fields Modifier and Type Field Description static floatBW_SCALEstatic StringPROP_COMPLETEFields inherited from class net.i2p.router.web.HelperBase
_context, _out, CHECKED, PROP_ADVANCED, SELECTED -
Constructor Summary
Constructors Constructor Description WizardHelper() -
Method Summary
Modifier and Type Method Description (package private) booleancancelNDT()Cancel the test.voidcomplete()StringgetCompletionStatus()StringgetDetailStatus()longgetDownBandwidth()StringgetInboundBurstRate()To populate form with.StringgetInboundBurstRateBits()Copied from ConfigNetHelper.StringgetOutboundBurstRate()To populate form with.StringgetOutboundBurstRateBits()Copied from ConfigNetHelper.StringgetServerLocation()intgetShareBandwidth()Adapted from ConfigNetHelper.StringgetShareRateBits()Copied from ConfigNetHelper.StringgetTestStatus()longgetUpBandwidth()booleanisNDTComplete()booleanisNDTRunning()booleanisNDTSuccessful()voidsetContextId(String contextId)Overriden to only do this once.(package private) booleanstartNDT()Start the test.Methods inherited from class net.i2p.router.web.HelperBase
_t, _t, _t, _x, getChecked, isAdvanced, ngettext, storeWriter
-
Field Details
-
PROP_COMPLETE
- See Also:
- Constant Field Values
-
BW_SCALE
public static final float BW_SCALE- See Also:
- Constant Field Values
-
-
Constructor Details
-
WizardHelper
public WizardHelper()
-
-
Method Details
-
setContextId
Overriden to only do this once.- Overrides:
setContextIdin classHelperBase- Parameters:
contextId- beginning few characters of the routerHash, or null to pick the first one we come across.
-
complete
public void complete() -
isNDTComplete
public boolean isNDTComplete() -
isNDTRunning
public boolean isNDTRunning() -
isNDTSuccessful
public boolean isNDTSuccessful() -
getTestStatus
- Returns:
- HTML-escaped status string or ""
-
getCompletionStatus
- Returns:
- HTML-escaped status string or ""
-
getDetailStatus
- Returns:
- HTML-escaped status string or ""
-
getUpBandwidth
public long getUpBandwidth()- Returns:
- bytes per second or 0
-
getDownBandwidth
public long getDownBandwidth()- Returns:
- bytes per second or 0
-
getServerLocation
- Returns:
- HTML-escaped location or ""
-
getInboundBurstRate
To populate form with. Uses the test result if available, else the current setting Adapted from ConfigNetHelper.- Returns:
- decimal KBytes/sec
-
getOutboundBurstRate
To populate form with. Uses the test result if available, else the current setting Adapted from ConfigNetHelper.- Returns:
- decimal KBytes/sec
-
getInboundBurstRateBits
Copied from ConfigNetHelper.- Returns:
- decimal
-
getOutboundBurstRateBits
Copied from ConfigNetHelper.- Returns:
- decimal
-
getShareRateBits
Copied from ConfigNetHelper.- Returns:
- decimal
-
getShareBandwidth
public int getShareBandwidth()Adapted from ConfigNetHelper.- Returns:
- in binary KBytes per second
-
startNDT
boolean startNDT()Start the test. Called from the Handler.- Returns:
- success
-
cancelNDT
boolean cancelNDT()Cancel the test. Called from the Handler.- Returns:
- success
-