GitHub user aledsage opened a pull request:
https://github.com/apache/incubator-brooklyn/pull/861
Adds Entity.sensors() to group the sensor methods
- The attribute/sensor methods are all in Entity.sensors().
- Deprecates the previous things in Entity.* and EntityLocal.*,
except for getAttribute(AttributeSensor) which is left as a convenience.
- In EntityInternal.sensors(), it returns SensorSupportInternal
which has more methods on it.
There are three big motivations for this:
- Consistency with entity.config()
- Simplification of the Entity class (which has way too many methods)
by grouping them.
- Exposing the methods of EntityLocal on Entity, so we can
deprecate EntityLocal (this commit deals with just the attribute/sensor
methods of EntityLocal)
Note that I haven't changed any of the uses of the old attribute methods. I
wanted to get feedback first as to whether people agreed this was the right
thing to do!
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/incubator-brooklyn
feature/add-Entity_sensors
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-brooklyn/pull/861.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #861
----
commit 938788656776f79be34443525b6c97f1f74b1667
Author: Aled Sage <[email protected]>
Date: 2015-08-20T20:59:57Z
Adds Entity.sensors() to group the sensor methods
- The attribute/sensor methods are all in Entity.sensors().
- Deprecates the previous things in Entity.* and EntityLocal.*,
except for getAttribute(AttributeSensor) which is left as a convenience.
- In EntityInternal.sensors(), it returns SensorSupportInternal
which has more methods on it.
There are three big motivations for this:
- Consistency with entity.config()
- Simplification of the Entity class (which has way too many methods)
by grouping them.
- Exposing the methods of EntityLocal on Entity, so we can
deprecate EntityLocal (this commit deals with just the attribute/sensor
methods of EntityLocal)
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---