Search in sources :

Example 1 with RuleChainDeviceMsg

use of org.thingsboard.server.actors.tenant.RuleChainDeviceMsg in project thingsboard by thingsboard.

the class AppActor method processDeviceMsg.

private void processDeviceMsg(ToDeviceActorMsg toDeviceActorMsg) {
    TenantId tenantId = toDeviceActorMsg.getTenantId();
    ActorRef tenantActor = getOrCreateTenantActor(tenantId);
    if (toDeviceActorMsg.getPayload().getMsgType().requiresRulesProcessing()) {
        tenantActor.tell(new RuleChainDeviceMsg(toDeviceActorMsg, ruleManager.getRuleChain(this.context())), context().self());
    } else {
        tenantActor.tell(toDeviceActorMsg, context().self());
    }
}
Also used : TenantId(org.thingsboard.server.common.data.id.TenantId) RuleChainDeviceMsg(org.thingsboard.server.actors.tenant.RuleChainDeviceMsg)

Aggregations

RuleChainDeviceMsg (org.thingsboard.server.actors.tenant.RuleChainDeviceMsg)1 TenantId (org.thingsboard.server.common.data.id.TenantId)1