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/app/ApplicationService.java b/core/api/src/main/java/org/onosproject/app/ApplicationService.java
index 1aaf092..bb55da9 100644
--- a/core/api/src/main/java/org/onosproject/app/ApplicationService.java
+++ b/core/api/src/main/java/org/onosproject/app/ApplicationService.java
@@ -18,13 +18,15 @@
 import org.onosproject.core.Application;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.Permission;
+import org.onosproject.event.ListenerService;
 
 import java.util.Set;
 
 /**
  * Service for inspecting inventory of network control applications.
  */
-public interface ApplicationService {
+public interface ApplicationService
+        extends ListenerService<ApplicationEvent, ApplicationListener> {
 
     /**
      * Returns the set of all installed applications.
@@ -65,18 +67,4 @@
      */
     Set<Permission> getPermissions(ApplicationId appId);
 
-    /**
-     * Adds the given listener for application lifecycle events.
-     *
-     * @param listener listener to be added
-     */
-    void addListener(ApplicationListener listener);
-
-    /**
-     * Removes the specified listener for application lifecycle events.
-     *
-     * @param listener listener to be removed
-     */
-    void removeListener(ApplicationListener listener);
-
 }