Search in sources :

Example 1 with ToDeviceRpcRequestActorMsg

use of org.thingsboard.server.service.rpc.ToDeviceRpcRequestActorMsg in project thingsboard by thingsboard.

the class DeviceActorMessageProcessor method processRpcRequest.

void processRpcRequest(TbActorCtx context, ToDeviceRpcRequestActorMsg msg) {
    ToDeviceRpcRequest request = msg.getMsg();
    ToDeviceRpcRequestMsg rpcRequest = creteToDeviceRpcRequestMsg(request);
    long timeout = request.getExpirationTime() - System.currentTimeMillis();
    boolean persisted = request.isPersisted();
    if (timeout <= 0) {
        log.debug("[{}][{}] Ignoring message due to exp time reached, {}", deviceId, request.getId(), request.getExpirationTime());
        if (persisted) {
            createRpc(request, RpcStatus.EXPIRED);
        }
        return;
    } else if (persisted) {
        createRpc(request, RpcStatus.QUEUED);
    }
    boolean sent = false;
    if (systemContext.isEdgesEnabled() && edgeId != null) {
        log.debug("[{}][{}] device is related to edge [{}]. Saving RPC request to edge queue", tenantId, deviceId, edgeId.getId());
        saveRpcRequestToEdgeQueue(request, rpcRequest.getRequestId());
        sent = true;
    } else if (isSendNewRpcAvailable()) {
        sent = rpcSubscriptions.size() > 0;
        Set<UUID> syncSessionSet = new HashSet<>();
        rpcSubscriptions.forEach((key, value) -> {
            sendToTransport(rpcRequest, key, value.getNodeId());
            if (SessionType.SYNC == value.getType()) {
                syncSessionSet.add(key);
            }
        });
        log.trace("Rpc syncSessionSet [{}] subscription after sent [{}]", syncSessionSet, rpcSubscriptions);
        syncSessionSet.forEach(rpcSubscriptions::remove);
    }
    if (persisted) {
        ObjectNode response = JacksonUtil.newObjectNode();
        response.put("rpcId", request.getId().toString());
        systemContext.getTbCoreDeviceRpcService().processRpcResponseFromDeviceActor(new FromDeviceRpcResponse(msg.getMsg().getId(), JacksonUtil.toString(response), null));
    }
    if (!persisted && request.isOneway() && sent) {
        log.debug("[{}] Rpc command response sent [{}]!", deviceId, request.getId());
        systemContext.getTbCoreDeviceRpcService().processRpcResponseFromDeviceActor(new FromDeviceRpcResponse(msg.getMsg().getId(), null, null));
    } else {
        registerPendingRpcRequest(context, msg, sent, rpcRequest, timeout);
    }
    if (sent) {
        log.debug("[{}] RPC request {} is sent!", deviceId, request.getId());
    } else {
        log.debug("[{}] RPC request {} is NOT sent!", deviceId, request.getId());
    }
}
Also used : Arrays(java.util.Arrays) RpcStatus(org.thingsboard.server.common.data.rpc.RpcStatus) KeyValueType(org.thingsboard.server.gen.transport.TransportProtos.KeyValueType) ToDeviceRpcRequestActorMsg(org.thingsboard.server.service.rpc.ToDeviceRpcRequestActorMsg) TenantId(org.thingsboard.server.common.data.id.TenantId) TbMsgMetaData(org.thingsboard.server.common.msg.TbMsgMetaData) EntityRelation(org.thingsboard.server.common.data.relation.EntityRelation) AttributeKvEntry(org.thingsboard.server.common.data.kv.AttributeKvEntry) SessionType(org.thingsboard.server.gen.transport.TransportProtos.SessionType) FromDeviceRpcResponseActorMsg(org.thingsboard.server.service.rpc.FromDeviceRpcResponseActorMsg) ActorSystemContext(org.thingsboard.server.actors.ActorSystemContext) Rpc(org.thingsboard.server.common.data.rpc.Rpc) AbstractContextAwareMsgProcessor(org.thingsboard.server.actors.shared.AbstractContextAwareMsgProcessor) SubscribeToAttributeUpdatesMsg(org.thingsboard.server.gen.transport.TransportProtos.SubscribeToAttributeUpdatesMsg) Map(java.util.Map) JsonNode(com.fasterxml.jackson.databind.JsonNode) DeviceAttributesEventNotificationMsg(org.thingsboard.rule.engine.api.msg.DeviceAttributesEventNotificationMsg) DeviceCredentialsUpdateNotificationMsg(org.thingsboard.rule.engine.api.msg.DeviceCredentialsUpdateNotificationMsg) EdgeId(org.thingsboard.server.common.data.id.EdgeId) GetAttributeResponseMsg(org.thingsboard.server.gen.transport.TransportProtos.GetAttributeResponseMsg) TransportToDeviceActorMsg(org.thingsboard.server.gen.transport.TransportProtos.TransportToDeviceActorMsg) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) ClaimDeviceMsg(org.thingsboard.server.gen.transport.TransportProtos.ClaimDeviceMsg) DeviceId(org.thingsboard.server.common.data.id.DeviceId) PageLink(org.thingsboard.server.common.data.page.PageLink) ToTransportUpdateCredentialsProto(org.thingsboard.server.gen.transport.TransportProtos.ToTransportUpdateCredentialsProto) StringUtils(org.thingsboard.server.common.data.StringUtils) Set(java.util.Set) TbActorCtx(org.thingsboard.server.actors.TbActorCtx) UUID(java.util.UUID) SortOrder(org.thingsboard.server.common.data.page.SortOrder) Collectors(java.util.stream.Collectors) EdgeEventActionType(org.thingsboard.server.common.data.edge.EdgeEventActionType) ToServerRpcResponseMsg(org.thingsboard.server.gen.transport.TransportProtos.ToServerRpcResponseMsg) Objects(java.util.Objects) Slf4j(lombok.extern.slf4j.Slf4j) List(java.util.List) SubscribeToRPCMsg(org.thingsboard.server.gen.transport.TransportProtos.SubscribeToRPCMsg) TbActorMsg(org.thingsboard.server.common.msg.TbActorMsg) KvEntry(org.thingsboard.server.common.data.kv.KvEntry) DeviceNameOrTypeUpdateMsg(org.thingsboard.rule.engine.api.msg.DeviceNameOrTypeUpdateMsg) TransportProtos(org.thingsboard.server.gen.transport.TransportProtos) GetAttributeRequestMsg(org.thingsboard.server.gen.transport.TransportProtos.GetAttributeRequestMsg) Optional(java.util.Optional) ToDeviceRpcRequestBody(org.thingsboard.server.common.data.rpc.ToDeviceRpcRequestBody) RemoveRpcActorMsg(org.thingsboard.server.service.rpc.RemoveRpcActorMsg) ConcurrentModificationException(java.util.ConcurrentModificationException) AttributeUpdateNotificationMsg(org.thingsboard.server.gen.transport.TransportProtos.AttributeUpdateNotificationMsg) DeviceActorServerSideRpcTimeoutMsg(org.thingsboard.server.common.msg.timeout.DeviceActorServerSideRpcTimeoutMsg) ToDeviceRpcRequestMsg(org.thingsboard.server.gen.transport.TransportProtos.ToDeviceRpcRequestMsg) TransportToDeviceActorMsgWrapper(org.thingsboard.server.service.transport.msg.TransportToDeviceActorMsgWrapper) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) ToDeviceRpcResponseMsg(org.thingsboard.server.gen.transport.TransportProtos.ToDeviceRpcResponseMsg) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) ToDeviceRpcRequest(org.thingsboard.server.common.msg.rpc.ToDeviceRpcRequest) Device(org.thingsboard.server.common.data.Device) JacksonUtil(org.thingsboard.common.util.JacksonUtil) HashMap(java.util.HashMap) DeviceEdgeUpdateMsg(org.thingsboard.rule.engine.api.msg.DeviceEdgeUpdateMsg) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) SessionSubscriptionInfoProto(org.thingsboard.server.gen.transport.TransportProtos.SessionSubscriptionInfoProto) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) LinkedHashMap(java.util.LinkedHashMap) LinkedHashMapRemoveEldest(org.thingsboard.common.util.LinkedHashMapRemoveEldest) CollectionUtils(org.apache.commons.collections.CollectionUtils) SessionCloseNotificationProto(org.thingsboard.server.gen.transport.TransportProtos.SessionCloseNotificationProto) KeyValueProto(org.thingsboard.server.gen.transport.TransportProtos.KeyValueProto) SessionEvent(org.thingsboard.server.gen.transport.TransportProtos.SessionEvent) DeviceSessionsCacheEntry(org.thingsboard.server.gen.transport.TransportProtos.DeviceSessionsCacheEntry) TbCallback(org.thingsboard.server.common.msg.queue.TbCallback) Nullable(javax.annotation.Nullable) AttributeKey(org.thingsboard.server.common.data.kv.AttributeKey) DataConstants(org.thingsboard.server.common.data.DataConstants) RpcId(org.thingsboard.server.common.data.id.RpcId) FromDeviceRpcResponse(org.thingsboard.server.common.msg.rpc.FromDeviceRpcResponse) DeviceCredentialsType(org.thingsboard.server.common.data.security.DeviceCredentialsType) DeviceCredentials(org.thingsboard.server.common.data.security.DeviceCredentials) SessionEventMsg(org.thingsboard.server.gen.transport.TransportProtos.SessionEventMsg) SessionInfoProto(org.thingsboard.server.gen.transport.TransportProtos.SessionInfoProto) RpcError(org.thingsboard.server.common.data.rpc.RpcError) FutureCallback(com.google.common.util.concurrent.FutureCallback) TsKvProto(org.thingsboard.server.gen.transport.TransportProtos.TsKvProto) Consumer(java.util.function.Consumer) SubscriptionInfoProto(org.thingsboard.server.gen.transport.TransportProtos.SubscriptionInfoProto) ToTransportMsg(org.thingsboard.server.gen.transport.TransportProtos.ToTransportMsg) Futures(com.google.common.util.concurrent.Futures) PageData(org.thingsboard.server.common.data.page.PageData) EdgeEvent(org.thingsboard.server.common.data.edge.EdgeEvent) EdgeEventType(org.thingsboard.server.common.data.edge.EdgeEventType) RelationTypeGroup(org.thingsboard.server.common.data.relation.RelationTypeGroup) ToDeviceRpcResponseStatusMsg(org.thingsboard.server.gen.transport.TransportProtos.ToDeviceRpcResponseStatusMsg) Collections(java.util.Collections) Set(java.util.Set) HashSet(java.util.HashSet) FromDeviceRpcResponse(org.thingsboard.server.common.msg.rpc.FromDeviceRpcResponse) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) ToDeviceRpcRequest(org.thingsboard.server.common.msg.rpc.ToDeviceRpcRequest) ToDeviceRpcRequestMsg(org.thingsboard.server.gen.transport.TransportProtos.ToDeviceRpcRequestMsg)

Example 2 with ToDeviceRpcRequestActorMsg

use of org.thingsboard.server.service.rpc.ToDeviceRpcRequestActorMsg in project thingsboard by thingsboard.

the class DeviceActorMessageProcessor method init.

void init(TbActorCtx ctx) {
    PageLink pageLink = new PageLink(1024, 0, null, new SortOrder("createdTime"));
    PageData<Rpc> pageData;
    do {
        pageData = systemContext.getTbRpcService().findAllByDeviceIdAndStatus(tenantId, deviceId, RpcStatus.QUEUED, pageLink);
        pageData.getData().forEach(rpc -> {
            ToDeviceRpcRequest msg = JacksonUtil.convertValue(rpc.getRequest(), ToDeviceRpcRequest.class);
            long timeout = rpc.getExpirationTime() - System.currentTimeMillis();
            if (timeout <= 0) {
                rpc.setStatus(RpcStatus.EXPIRED);
                systemContext.getTbRpcService().save(tenantId, rpc);
            } else {
                registerPendingRpcRequest(ctx, new ToDeviceRpcRequestActorMsg(systemContext.getServiceId(), msg), false, creteToDeviceRpcRequestMsg(msg), timeout);
            }
        });
        if (pageData.hasNext()) {
            pageLink = pageLink.nextPageLink();
        }
    } while (pageData.hasNext());
}
Also used : Rpc(org.thingsboard.server.common.data.rpc.Rpc) ToDeviceRpcRequest(org.thingsboard.server.common.msg.rpc.ToDeviceRpcRequest) ToDeviceRpcRequestActorMsg(org.thingsboard.server.service.rpc.ToDeviceRpcRequestActorMsg) PageLink(org.thingsboard.server.common.data.page.PageLink) SortOrder(org.thingsboard.server.common.data.page.SortOrder)

Example 3 with ToDeviceRpcRequestActorMsg

use of org.thingsboard.server.service.rpc.ToDeviceRpcRequestActorMsg in project thingsboard by thingsboard.

the class DefaultTbCoreConsumerService method launchMainConsumers.

@Override
protected void launchMainConsumers() {
    consumersExecutor.submit(() -> {
        while (!stopped) {
            try {
                List<TbProtoQueueMsg<ToCoreMsg>> msgs = mainConsumer.poll(pollDuration);
                if (msgs.isEmpty()) {
                    continue;
                }
                List<IdMsgPair<ToCoreMsg>> orderedMsgList = msgs.stream().map(msg -> new IdMsgPair<>(UUID.randomUUID(), msg)).collect(Collectors.toList());
                ConcurrentMap<UUID, TbProtoQueueMsg<ToCoreMsg>> pendingMap = orderedMsgList.stream().collect(Collectors.toConcurrentMap(IdMsgPair::getUuid, IdMsgPair::getMsg));
                CountDownLatch processingTimeoutLatch = new CountDownLatch(1);
                TbPackProcessingContext<TbProtoQueueMsg<ToCoreMsg>> ctx = new TbPackProcessingContext<>(processingTimeoutLatch, pendingMap, new ConcurrentHashMap<>());
                PendingMsgHolder pendingMsgHolder = new PendingMsgHolder();
                Future<?> packSubmitFuture = consumersExecutor.submit(() -> {
                    orderedMsgList.forEach((element) -> {
                        UUID id = element.getUuid();
                        TbProtoQueueMsg<ToCoreMsg> msg = element.getMsg();
                        log.trace("[{}] Creating main callback for message: {}", id, msg.getValue());
                        TbCallback callback = new TbPackCallback<>(id, ctx);
                        try {
                            ToCoreMsg toCoreMsg = msg.getValue();
                            pendingMsgHolder.setToCoreMsg(toCoreMsg);
                            if (toCoreMsg.hasToSubscriptionMgrMsg()) {
                                log.trace("[{}] Forwarding message to subscription manager service {}", id, toCoreMsg.getToSubscriptionMgrMsg());
                                forwardToSubMgrService(toCoreMsg.getToSubscriptionMgrMsg(), callback);
                            } else if (toCoreMsg.hasToDeviceActorMsg()) {
                                log.trace("[{}] Forwarding message to device actor {}", id, toCoreMsg.getToDeviceActorMsg());
                                forwardToDeviceActor(toCoreMsg.getToDeviceActorMsg(), callback);
                            } else if (toCoreMsg.hasDeviceStateServiceMsg()) {
                                log.trace("[{}] Forwarding message to state service {}", id, toCoreMsg.getDeviceStateServiceMsg());
                                forwardToStateService(toCoreMsg.getDeviceStateServiceMsg(), callback);
                            } else if (toCoreMsg.hasEdgeNotificationMsg()) {
                                log.trace("[{}] Forwarding message to edge service {}", id, toCoreMsg.getEdgeNotificationMsg());
                                forwardToEdgeNotificationService(toCoreMsg.getEdgeNotificationMsg(), callback);
                            } else if (!toCoreMsg.getToDeviceActorNotificationMsg().isEmpty()) {
                                Optional<TbActorMsg> actorMsg = encodingService.decode(toCoreMsg.getToDeviceActorNotificationMsg().toByteArray());
                                if (actorMsg.isPresent()) {
                                    TbActorMsg tbActorMsg = actorMsg.get();
                                    if (tbActorMsg.getMsgType().equals(MsgType.DEVICE_RPC_REQUEST_TO_DEVICE_ACTOR_MSG)) {
                                        tbCoreDeviceRpcService.forwardRpcRequestToDeviceActor((ToDeviceRpcRequestActorMsg) tbActorMsg);
                                    } else {
                                        log.trace("[{}] Forwarding message to App Actor {}", id, actorMsg.get());
                                        actorContext.tell(actorMsg.get());
                                    }
                                }
                                callback.onSuccess();
                            }
                        } catch (Throwable e) {
                            log.warn("[{}] Failed to process message: {}", id, msg, e);
                            callback.onFailure(e);
                        }
                    });
                });
                if (!processingTimeoutLatch.await(packProcessingTimeout, TimeUnit.MILLISECONDS)) {
                    if (!packSubmitFuture.isDone()) {
                        packSubmitFuture.cancel(true);
                        ToCoreMsg lastSubmitMsg = pendingMsgHolder.getToCoreMsg();
                        log.info("Timeout to process message: {}", lastSubmitMsg);
                    }
                    ctx.getAckMap().forEach((id, msg) -> log.debug("[{}] Timeout to process message: {}", id, msg.getValue()));
                    ctx.getFailedMap().forEach((id, msg) -> log.warn("[{}] Failed to process message: {}", id, msg.getValue()));
                }
                mainConsumer.commit();
            } catch (Exception e) {
                if (!stopped) {
                    log.warn("Failed to obtain messages from queue.", e);
                    try {
                        Thread.sleep(pollDuration);
                    } catch (InterruptedException e2) {
                        log.trace("Failed to wait until the server has capacity to handle new requests", e2);
                    }
                }
            }
        }
        log.info("TB Core Consumer stopped.");
    });
}
Also used : TbCoreDeviceRpcService(org.thingsboard.server.service.rpc.TbCoreDeviceRpcService) DeviceStateServiceMsgProto(org.thingsboard.server.gen.transport.TransportProtos.DeviceStateServiceMsgProto) ApplicationReadyEvent(org.springframework.boot.context.event.ApplicationReadyEvent) ToDeviceRpcRequestActorMsg(org.thingsboard.server.service.rpc.ToDeviceRpcRequestActorMsg) ToCoreNotificationMsg(org.thingsboard.server.gen.transport.TransportProtos.ToCoreNotificationMsg) StatsFactory(org.thingsboard.server.common.stats.StatsFactory) TenantId(org.thingsboard.server.common.data.id.TenantId) PreDestroy(javax.annotation.PreDestroy) Future(java.util.concurrent.Future) TbAlarmDeleteProto(org.thingsboard.server.gen.transport.TransportProtos.TbAlarmDeleteProto) ActorSystemContext(org.thingsboard.server.actors.ActorSystemContext) EdgeNotificationService(org.thingsboard.server.service.edge.EdgeNotificationService) SubscriptionMgrMsgProto(org.thingsboard.server.gen.transport.TransportProtos.SubscriptionMgrMsgProto) AbstractConsumerService(org.thingsboard.server.service.queue.processing.AbstractConsumerService) LocalSubscriptionServiceMsgProto(org.thingsboard.server.gen.transport.TransportProtos.LocalSubscriptionServiceMsgProto) FromDeviceRPCResponseProto(org.thingsboard.server.gen.transport.TransportProtos.FromDeviceRPCResponseProto) TbSubscriptionCloseProto(org.thingsboard.server.gen.transport.TransportProtos.TbSubscriptionCloseProto) TransportToDeviceActorMsg(org.thingsboard.server.gen.transport.TransportProtos.TransportToDeviceActorMsg) TbAlarmUpdateProto(org.thingsboard.server.gen.transport.TransportProtos.TbAlarmUpdateProto) ToOtaPackageStateServiceMsg(org.thingsboard.server.gen.transport.TransportProtos.ToOtaPackageStateServiceMsg) DeviceStateService(org.thingsboard.server.service.state.DeviceStateService) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) EventListener(org.springframework.context.event.EventListener) ThingsBoardThreadFactory(org.thingsboard.common.util.ThingsBoardThreadFactory) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) TbTimeSeriesUpdateProto(org.thingsboard.server.gen.transport.TransportProtos.TbTimeSeriesUpdateProto) Executors(java.util.concurrent.Executors) Alarm(org.thingsboard.server.common.data.alarm.Alarm) CountDownLatch(java.util.concurrent.CountDownLatch) Slf4j(lombok.extern.slf4j.Slf4j) List(java.util.List) TbActorMsg(org.thingsboard.server.common.msg.TbActorMsg) TbCoreQueueFactory(org.thingsboard.server.queue.provider.TbCoreQueueFactory) PostConstruct(javax.annotation.PostConstruct) Optional(java.util.Optional) TbTenantProfileCache(org.thingsboard.server.dao.tenant.TbTenantProfileCache) TbApiUsageStateService(org.thingsboard.server.service.apiusage.TbApiUsageStateService) TbQueueConsumer(org.thingsboard.server.queue.TbQueueConsumer) TransportToDeviceActorMsgWrapper(org.thingsboard.server.service.transport.msg.TransportToDeviceActorMsgWrapper) Setter(lombok.Setter) Getter(lombok.Getter) JacksonUtil(org.thingsboard.common.util.JacksonUtil) Scheduled(org.springframework.scheduling.annotation.Scheduled) Function(java.util.function.Function) TbAttributeDeleteProto(org.thingsboard.server.gen.transport.TransportProtos.TbAttributeDeleteProto) DataDecodingEncodingService(org.thingsboard.server.common.transport.util.DataDecodingEncodingService) ConcurrentMap(java.util.concurrent.ConcurrentMap) Value(org.springframework.beans.factory.annotation.Value) MsgType(org.thingsboard.server.common.msg.MsgType) ToUsageStatsServiceMsg(org.thingsboard.server.gen.transport.TransportProtos.ToUsageStatsServiceMsg) TbCoreComponent(org.thingsboard.server.queue.util.TbCoreComponent) ServiceType(org.thingsboard.server.common.msg.queue.ServiceType) Service(org.springframework.stereotype.Service) ToCoreMsg(org.thingsboard.server.gen.transport.TransportProtos.ToCoreMsg) TbAttributeUpdateProto(org.thingsboard.server.gen.transport.TransportProtos.TbAttributeUpdateProto) TbCallback(org.thingsboard.server.common.msg.queue.TbCallback) ExecutorService(java.util.concurrent.ExecutorService) IdMsgPair(org.thingsboard.server.service.queue.processing.IdMsgPair) TbSubscriptionUtils(org.thingsboard.server.service.subscription.TbSubscriptionUtils) Order(org.springframework.core.annotation.Order) FromDeviceRpcResponse(org.thingsboard.server.common.msg.rpc.FromDeviceRpcResponse) PartitionChangeEvent(org.thingsboard.server.queue.discovery.event.PartitionChangeEvent) EdgeNotificationMsgProto(org.thingsboard.server.gen.transport.TransportProtos.EdgeNotificationMsgProto) RpcError(org.thingsboard.server.common.data.rpc.RpcError) TbDeviceProfileCache(org.thingsboard.server.service.profile.TbDeviceProfileCache) TimeUnit(java.util.concurrent.TimeUnit) SubscriptionManagerService(org.thingsboard.server.service.subscription.SubscriptionManagerService) OtaPackageStateService(org.thingsboard.server.service.ota.OtaPackageStateService) TbLocalSubscriptionService(org.thingsboard.server.service.subscription.TbLocalSubscriptionService) TbTimeSeriesDeleteProto(org.thingsboard.server.gen.transport.TransportProtos.TbTimeSeriesDeleteProto) TbProtoQueueMsg(org.thingsboard.server.queue.common.TbProtoQueueMsg) IdMsgPair(org.thingsboard.server.service.queue.processing.IdMsgPair) TbProtoQueueMsg(org.thingsboard.server.queue.common.TbProtoQueueMsg) CountDownLatch(java.util.concurrent.CountDownLatch) ToCoreMsg(org.thingsboard.server.gen.transport.TransportProtos.ToCoreMsg) TbCallback(org.thingsboard.server.common.msg.queue.TbCallback) UUID(java.util.UUID) TbActorMsg(org.thingsboard.server.common.msg.TbActorMsg)

Aggregations

List (java.util.List)2 Optional (java.util.Optional)2 UUID (java.util.UUID)2 Collectors (java.util.stream.Collectors)2 Slf4j (lombok.extern.slf4j.Slf4j)2 JacksonUtil (org.thingsboard.common.util.JacksonUtil)2 ActorSystemContext (org.thingsboard.server.actors.ActorSystemContext)2 ToDeviceRpcRequestActorMsg (org.thingsboard.server.service.rpc.ToDeviceRpcRequestActorMsg)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 FutureCallback (com.google.common.util.concurrent.FutureCallback)1 Futures (com.google.common.util.concurrent.Futures)1 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)1 MoreExecutors (com.google.common.util.concurrent.MoreExecutors)1 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 ConcurrentModificationException (java.util.ConcurrentModificationException)1 HashMap (java.util.HashMap)1