|
|
@ -51,7 +51,7 @@ public abstract class TbAbstractGetAttributesNode<C extends TbGetAttributesNodeC |
|
|
public void onMsg(TbContext ctx, TbMsg msg) throws TbNodeException { |
|
|
public void onMsg(TbContext ctx, TbMsg msg) throws TbNodeException { |
|
|
try { |
|
|
try { |
|
|
withCallback( |
|
|
withCallback( |
|
|
findEntityIdAsync(ctx, msg.getOriginator()), |
|
|
findEntityIdAsync(ctx, msg), |
|
|
entityId -> safePutAttributes(ctx, msg, entityId), |
|
|
entityId -> safePutAttributes(ctx, msg, entityId), |
|
|
t -> ctx.tellFailure(msg, t), ctx.getDbCallbackExecutor()); |
|
|
t -> ctx.tellFailure(msg, t), ctx.getDbCallbackExecutor()); |
|
|
} catch (Throwable th) { |
|
|
} catch (Throwable th) { |
|
|
@ -112,5 +112,5 @@ public abstract class TbAbstractGetAttributesNode<C extends TbGetAttributesNodeC |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected abstract ListenableFuture<T> findEntityIdAsync(TbContext ctx, EntityId originator); |
|
|
protected abstract ListenableFuture<T> findEntityIdAsync(TbContext ctx, TbMsg msg); |
|
|
} |
|
|
} |
|
|
|