brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alasdairhodge <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Add EntityDynamicType.removeEffec...
Date Wed, 22 Jul 2015 16:16:10 GMT
Github user alasdairhodge commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/749#discussion_r35231442
  
    --- Diff: core/src/main/java/brooklyn/entity/basic/EntityDynamicType.java ---
    @@ -130,17 +130,38 @@ public void addEffector(Effector<?> newEffector) {
                 instance.emit(AbstractEntity.EFFECTOR_ADDED, newEffector.getName());
         }
     
    -    /** Adds an effector with an explicit body */
    +    /**
    +     * Adds an effector with an explicit body to this entity.
    +     */
         @Beta
         public <T> void addEffector(Effector<T> effector, EffectorTaskFactory<T>
body) {
             addEffector(new EffectorAndBody<T>(effector, body));
         }
    -    /** Adds an effector with an explicit body */
    +
    +    /**
    +     * Adds an effector with an explicit body to this entity.
    +     */
         @Beta
         public <T> void addEffector(Effector<T> effector, EffectorBody<T>
body) {
             addEffector(effector, new EffectorBodyTaskFactory<T>(body));
         }
     
    +    /**
    +     * Removes the given {@link Effector} from this entity.
    +     * <p>
    +     * Note that if the argument is an instance of {@link EffectorWithBody} it will
    +     * still be possible to invoke the effector on the entity by calling
    +     * <code>entity.invoke(effector, argumentsMap)</code>.
    +     */
    --- End diff --
    
    The ability to invoke removed efectors is a bug, this comment should reflect that. Is
it trivial to fix `entity.invoke()`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message