[ONOS-5607] Revise LISP ctrl impl class to track msgs and routers

Change-Id: I4a51a8ef9162e3feee543f40fa92a0435186d1c9
diff --git a/protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispController.java b/protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispController.java
index 5c47109..1a3641d 100644
--- a/protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispController.java
+++ b/protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispController.java
@@ -29,6 +29,13 @@
     Iterable<LispRouter> getRouters();
 
     /**
+     * Obtains all subscribed LISP routers known to this LISP controllers.
+     *
+     * @return Iterable of LISP router elements
+     */
+    Iterable<LispRouter> getSubscribedRouters();
+
+    /**
      * Obtains the actual router for the given LispRouterId.
      *
      * @param routerId the router to fetch
diff --git a/protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispRouter.java b/protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispRouter.java
index a6fa99f..5b32853 100644
--- a/protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispRouter.java
+++ b/protocols/lisp/api/src/main/java/org/onosproject/lisp/ctl/LispRouter.java
@@ -80,4 +80,47 @@
      * @return whether the router is connected
      */
     boolean isConnected();
+
+    /**
+     * Sets whether the router is connected.
+     *
+     * @param connected whether the router is connected
+     */
+    void setConnected(boolean connected);
+
+    /**
+     * Checks if the router is subscribed.
+     * As long as a router sends Map-Request message,
+     * we treat the router is subscribed.
+     *
+     * @return whether the router is subscribed
+     */
+    boolean isSubscribed();
+
+    /**
+     * Sets whether the router is subscribed.
+     *
+     * @param subscribed whether the router is subscribed
+     */
+    void setSubscribed(boolean subscribed);
+
+    /**
+     * Sets the LISP agent to be used. This method can only be invoked once.
+     *
+     * @param agent the agent to set
+     */
+    void setAgent(LispRouterAgent agent);
+
+    /**
+     * Announces to the LISP agent that this router has connected.
+     *
+     * @return true if successful, false if duplicate router
+     */
+    boolean connectRouter();
+
+    /**
+     * Disconnects the router by closing UDP connection.
+     * Results in a call to the channel handler's close method for cleanup.
+     */
+    void disconnectRouter();
 }