public class InternalOtaHandler extends Object implements DeviceEventHandler
Modifier and Type | Method and Description |
---|---|
void |
onDeviceEvent(DeviceEvent event)
Invoked when the DeviceEvent occurs.
|
void |
pauseOtaUpgrade(Device device)
Pauses an on-going ota upgrade.
|
void |
resetRateLimitPolicy(Device device)
Resets the rate limit policy of an ota upgrade to default.
|
void |
setOtaUpgradePolicy(UpgradePolicy policy)
Sets the OTA upgrade policy of the OTA server.
|
void |
setRateLimitPolicy(Device device,
RateLimitPolicy policy)
Sets the rate limit policy of an ota upgrade.
|
void |
unpauseOtaUpgrade(Device device)
Unpauses an ota upgrade that was previously paused.
|
public void pauseOtaUpgrade(Device device)
device
- device that is upgrading, which must not be null.NullPointerException
- if supplied device
is null.public void unpauseOtaUpgrade(Device device)
device
- device that is upgrading, which must not be null.NullPointerException
- if supplied device
is null.public void setRateLimitPolicy(Device device, RateLimitPolicy policy)
device
- device that is upgrading, which must not be null.policy
- rate limit policy that defines the one time upgrade delay and upgrade interval, which must not be null.NullPointerException
- if supplied device
or policy
is null.public void resetRateLimitPolicy(Device device)
device
- device that is currently upgrading, which must not be null.NullPointerException
- if supplied device
is null.public void setOtaUpgradePolicy(UpgradePolicy policy)
policy
- OTA upgrade policy that specifies upgrade, downgrade or all upgrades is allowed. It must not be null.NullPointerException
- if supplied policy
is null.public void onDeviceEvent(DeviceEvent event)
DeviceEventHandler
onDeviceEvent
in interface DeviceEventHandler
event
- The DeviceEvent that has occurred.Copyright © 2021. All rights reserved.