Adding some base-classes to eliminate event and listener boiler-plate code throughout a number of subsystems.
Refactored all core components to take advantage of this; apps remain to be done.
Change-Id: Ib0935ba07ff81b0fa032534004ec9ac6187cbf22
diff --git a/core/api/src/main/java/org/onosproject/net/group/GroupService.java b/core/api/src/main/java/org/onosproject/net/group/GroupService.java
index cdd56c7..4163248 100644
--- a/core/api/src/main/java/org/onosproject/net/group/GroupService.java
+++ b/core/api/src/main/java/org/onosproject/net/group/GroupService.java
@@ -16,6 +16,7 @@
package org.onosproject.net.group;
import org.onosproject.core.ApplicationId;
+import org.onosproject.event.ListenerService;
import org.onosproject.net.DeviceId;
/**
@@ -32,7 +33,8 @@
* where the master copy of the groups lies with the controller and
* the devices hold only the 'cached' copy.
*/
-public interface GroupService {
+public interface GroupService
+ extends ListenerService<GroupEvent, GroupListener> {
/**
* Creates a group in the specified device with the provided buckets.
@@ -134,17 +136,4 @@
*/
Iterable<Group> getGroups(DeviceId deviceId);
- /**
- * Adds the specified group listener.
- *
- * @param listener group listener
- */
- void addListener(GroupListener listener);
-
- /**
- * Removes the specified group listener.
- *
- * @param listener group listener
- */
- void removeListener(GroupListener listener);
}