Class DeviceManagementImpl
java.lang.Object
de.iip_ecosphere.platform.deviceMgt.DeviceManagementImpl
- All Implemented Interfaces:
DeviceFirmwareOperations,DeviceManagement,DeviceRemoteManagementOperations,DeviceResourceConfigOperations
Default DeviceManagemt implementation, which gets build by the DeviceManagementFactory
with the help of the loaded service providers.
- Author:
- Dennis Pidun, University of Hildesheim
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.deviceMgt.DeviceRemoteManagementOperations
DeviceRemoteManagementOperations.SSHConnectionDetails -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DeviceRegistryprivate DeviceFirmwareOperationsprivate DeviceRemoteManagementOperationsprivate DeviceResourceConfigOperations -
Constructor Summary
ConstructorsConstructorDescriptionDeviceManagementImpl(DeviceFirmwareOperations firmwareOperations, DeviceRemoteManagementOperations remoteManagementOperations, DeviceResourceConfigOperations resourceConfigOperations) Constructor for DeviceManagementImpl. -
Method Summary
Modifier and TypeMethodDescriptionestablishSsh(String id) Sends request to given remoteManagementOperations.voidSends request to given remoteManagementOperations if the device is available.voidupdateRuntime(String id) Sends request to given firmwareOperations if it the device is available.
-
Field Details
-
firmwareOperations
-
remoteManagementOperations
-
resourceConfigOperations
-
deviceRegistry
-
-
Constructor Details
-
DeviceManagementImpl
public DeviceManagementImpl(DeviceFirmwareOperations firmwareOperations, DeviceRemoteManagementOperations remoteManagementOperations, DeviceResourceConfigOperations resourceConfigOperations) Constructor for DeviceManagementImpl. AsksDeviceRegistryFactoryto get the latest DeviceRegistry.- Parameters:
firmwareOperations- the DeviceFirmwareOperations to useremoteManagementOperations- the DeviceRemoteManagementOperations to useresourceConfigOperations- the DeviceResourceConfigOperations to use
-
-
Method Details
-
updateRuntime
Sends request to given firmwareOperations if it the device is available.- Specified by:
updateRuntimein interfaceDeviceFirmwareOperations- Parameters:
id- the id of the device- Throws:
ExecutionException- if the operation fails
-
establishSsh
public DeviceRemoteManagementOperations.SSHConnectionDetails establishSsh(String id) throws ExecutionException Sends request to given remoteManagementOperations.- Specified by:
establishSshin interfaceDeviceRemoteManagementOperations- Parameters:
id- the id of the device- Returns:
- SSHConnectionDetails if the device is available, otherwise null
- Throws:
ExecutionException- if the operation fails
-
setConfig
Sends request to given remoteManagementOperations if the device is available.- Specified by:
setConfigin interfaceDeviceResourceConfigOperations- Parameters:
id- the id of the deviceconfigPath- the configPath stored in the storage- Throws:
ExecutionException- if the operation fails
-