Search in sources :

Example 1 with DeviceCredentialsUpdateNotificationMsg

use of org.thingsboard.server.extensions.api.device.DeviceCredentialsUpdateNotificationMsg in project thingsboard by thingsboard.

the class DefaultActorService method onCredentialsUpdate.

@Override
public void onCredentialsUpdate(TenantId tenantId, DeviceId deviceId) {
    DeviceCredentialsUpdateNotificationMsg msg = new DeviceCredentialsUpdateNotificationMsg(tenantId, deviceId);
    Optional<ServerAddress> address = actorContext.getRoutingService().resolveById(deviceId);
    if (address.isPresent()) {
        rpcService.tell(address.get(), msg);
    } else {
        onMsg(msg);
    }
}
Also used : ServerAddress(org.thingsboard.server.common.msg.cluster.ServerAddress) DeviceCredentialsUpdateNotificationMsg(org.thingsboard.server.extensions.api.device.DeviceCredentialsUpdateNotificationMsg)

Aggregations

ServerAddress (org.thingsboard.server.common.msg.cluster.ServerAddress)1 DeviceCredentialsUpdateNotificationMsg (org.thingsboard.server.extensions.api.device.DeviceCredentialsUpdateNotificationMsg)1