Search in sources :

Example 1 with KuraDisconnectPayload

use of org.eclipse.kura.core.message.KuraDisconnectPayload in project kura by eclipse.

the class LifeCyclePayloadBuilder method buildDisconnectPayload.

public KuraDisconnectPayload buildDisconnectPayload() {
    SystemService systemService = this.m_cloudServiceImpl.getSystemService();
    SystemAdminService sysAdminService = this.m_cloudServiceImpl.getSystemAdminService();
    CloudServiceOptions cloudOptions = this.m_cloudServiceImpl.getCloudServiceOptions();
    // build device name
    String deviceName = cloudOptions.getDeviceDisplayName();
    if (deviceName == null) {
        deviceName = systemService.getDeviceName();
    }
    // build payload
    KuraDisconnectPayload payload = new KuraDisconnectPayload(sysAdminService.getUptime(), deviceName);
    return payload;
}
Also used : SystemService(org.eclipse.kura.system.SystemService) KuraDisconnectPayload(org.eclipse.kura.core.message.KuraDisconnectPayload) SystemAdminService(org.eclipse.kura.system.SystemAdminService)

Aggregations

KuraDisconnectPayload (org.eclipse.kura.core.message.KuraDisconnectPayload)1 SystemAdminService (org.eclipse.kura.system.SystemAdminService)1 SystemService (org.eclipse.kura.system.SystemService)1