Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/310#discussion_r20077066
--- Diff: core/src/main/java/brooklyn/management/internal/UsageManager.java
---
@@ -18,20 +18,47 @@
*/
package brooklyn.management.internal;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
+import brooklyn.config.ConfigKey;
import brooklyn.entity.Application;
+import brooklyn.entity.basic.ConfigKeys;
import brooklyn.entity.basic.Lifecycle;
import brooklyn.location.Location;
import brooklyn.management.usage.ApplicationUsage;
+import brooklyn.management.usage.ApplicationUsage.ApplicationEvent;
import brooklyn.management.usage.LocationUsage;
+import brooklyn.management.usage.LocationUsage.LocationEvent;
import com.google.common.annotations.Beta;
import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableList;
+import com.google.common.reflect.TypeToken;
@Beta
public interface UsageManager {
+ @SuppressWarnings("serial")
+ public static final ConfigKey<List<UsageListener>> USAGE_LISTENERS =
ConfigKeys.newConfigKey(
+ new TypeToken<List<UsageListener>>() {},
+ "brooklyn.usageManager.listeners", "Optional usage listeners
(i.e. for metering)",
+ ImmutableList.<UsageListener>of());
+
+ public static interface UsageListener {
--- End diff --
Given it's in `UsageManager` then I'm ok with the name `UsageListener`
rather than `ManagementEventListener` (the latter might suggest a wider range
of events).
---
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.
---