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/flow/FlowRuleService.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
index 43d0f5d..e297115 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
@@ -16,6 +16,7 @@
 package org.onosproject.net.flow;
 
 import org.onosproject.core.ApplicationId;
+import org.onosproject.event.ListenerService;
 import org.onosproject.net.DeviceId;
 
 /**
@@ -25,7 +26,8 @@
  * of the flow rules lies with the controller and the devices hold only the
  * 'cached' copy.
  */
-public interface FlowRuleService {
+public interface FlowRuleService
+    extends ListenerService<FlowRuleEvent, FlowRuleListener> {
 
     /**
      * The topic used for obtaining globally unique ids.
@@ -102,17 +104,4 @@
      */
     void apply(FlowRuleOperations ops);
 
-    /**
-     * Adds the specified flow rule listener.
-     *
-     * @param listener flow rule listener
-     */
-    void addListener(FlowRuleListener listener);
-
-    /**
-     * Removes the specified flow rule listener.
-     *
-     * @param listener flow rule listener
-     */
-    void removeListener(FlowRuleListener listener);
 }