Search in sources :

Example 1 with TbNode

use of org.thingsboard.rule.engine.api.TbNode in project thingsboard by thingsboard.

the class RuleNodeActorMessageProcessor method initComponent.

private TbNode initComponent(RuleNode ruleNode) throws Exception {
    TbNode tbNode = null;
    if (ruleNode != null) {
        Class<?> componentClazz = Class.forName(ruleNode.getType());
        tbNode = (TbNode) (componentClazz.getDeclaredConstructor().newInstance());
        tbNode.init(defaultCtx, new TbNodeConfiguration(ruleNode.getConfiguration()));
    }
    return tbNode;
}
Also used : TbNode(org.thingsboard.rule.engine.api.TbNode) TbNodeConfiguration(org.thingsboard.rule.engine.api.TbNodeConfiguration)

Aggregations

TbNode (org.thingsboard.rule.engine.api.TbNode)1 TbNodeConfiguration (org.thingsboard.rule.engine.api.TbNodeConfiguration)1