public abstract class BandwidthManipulator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Config |
config |
protected NodeClientCore |
core |
Constructor and Description |
---|
BandwidthManipulator(NodeClientCore core,
Config config) |
Modifier and Type | Method and Description |
---|---|
protected BandwidthLimit |
detectBandwidthLimits()
Attempts to detect upstream and downstream bandwidth limits.
|
protected BandwidthLimit |
getCurrentBandwidthLimitsOrNull() |
protected HTMLNode |
parseErrorBox(HTMLNode parent,
PageHelper helper,
java.lang.String message)
Creates a titled infobox for a bandwidth setting error.
|
protected void |
setBandwidthLimit(java.lang.String limit,
boolean setOutputLimit)
Sets the selected limit type to the given limit.
|
protected void |
setWizardComplete() |
protected final NodeClientCore core
protected final Config config
public BandwidthManipulator(NodeClientCore core, Config config)
protected void setBandwidthLimit(java.lang.String limit, boolean setOutputLimit) throws InvalidConfigValueException
limit
- To parse limit from. Can include SI or IEC units, but not /s.setOutputLimit
- If true, output limit is set. If false, input limit is set.InvalidConfigValueException
- If the value is negative, a number cannot be parsed from it, or the value is too low to be usable.Node.minimumBandwidth
protected HTMLNode parseErrorBox(HTMLNode parent, PageHelper helper, java.lang.String message)
parent
- Node to attach warning to.helper
- Helper to create infobox.message
- Message to display in the infobox body.protected BandwidthLimit getCurrentBandwidthLimitsOrNull()
protected BandwidthLimit detectBandwidthLimits()
protected void setWizardComplete()