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;
}
Aggregations