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_COMPLETE-
Fields inherited from class net.i2p.router.web.HelperBase
_context, _out, CHECKED, PROP_ADVANCED, SELECTED
-
-
Constructor Summary
Constructors Constructor Description WizardHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods 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 Detail
-
PROP_COMPLETE
public static final String PROP_COMPLETE
- See Also:
- Constant Field Values
-
BW_SCALE
public static final float BW_SCALE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setContextId
public void setContextId(String contextId)
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
public String getTestStatus()
- Returns:
- HTML-escaped status string or ""
-
getCompletionStatus
public String getCompletionStatus()
- Returns:
- HTML-escaped status string or ""
-
getDetailStatus
public String 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
public String getServerLocation()
- Returns:
- HTML-escaped location or ""
-
getInboundBurstRate
public String getInboundBurstRate()
To populate form with. Uses the test result if available, else the current setting Adapted from ConfigNetHelper.- Returns:
- decimal KBytes/sec
-
getOutboundBurstRate
public String getOutboundBurstRate()
To populate form with. Uses the test result if available, else the current setting Adapted from ConfigNetHelper.- Returns:
- decimal KBytes/sec
-
getInboundBurstRateBits
public String getInboundBurstRateBits()
Copied from ConfigNetHelper.- Returns:
- decimal
-
getOutboundBurstRateBits
public String getOutboundBurstRateBits()
Copied from ConfigNetHelper.- Returns:
- decimal
-
getShareRateBits
public String 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
-
-