changed the pom.xml to include proper integration test
[controller.git] / opendaylight / md-sal / zeromq-routingtable / implementation / src / main / java / org / opendaylight / controller / sal / connector / remoterpc / api / RoutingTable.java
@@ -11,6 +11,8 @@ import java.util.Set;
 
 public interface RoutingTable<I,R> {
 
+
+
   /**
    * Adds a network address for the route. If address for route
    * exists, appends the address to the list
@@ -18,17 +20,22 @@ public interface RoutingTable<I,R> {
    * @param routeId route identifier
    * @param route network address
    */
-  public void addRoute(I routeId, R route);
+  public void addRoute(I routeId, R route) throws SystemException,  RoutingTableException;
 
   /**
    * Adds a network address for the route. If the route already exists,
-   * it throws. This method would be used when registering a global service.
+   * it throws <code>DuplicateRouteException</code>.
+   * This method would be used when registering a global service.
+   *
    *
    * @param routeId route identifier
    * @param route network address
    * @throws DuplicateRouteException
    */
-  public void addGlobalRoute(I routeId, R route) throws DuplicateRouteException;
+  public void addGlobalRoute(I routeId, R route) throws  RoutingTableException, SystemException;
+
+
+
 
   /**
    * Removes the network address for the route from routing table. If only
@@ -38,6 +45,14 @@ public interface RoutingTable<I,R> {
    */
   public void removeRoute(I routeId, R route);
 
+
+    /**
+     * Remove the route.
+     * This method would be used when registering a global service.
+     * @param routeId
+     */
+    public void removeGlobalRoute(I routeId);
+
   /**
    * Returns a set of network addresses associated with this route
    * @param routeId
@@ -49,12 +64,18 @@ public interface RoutingTable<I,R> {
    * Returns only one address from the list of network addresses
    * associated with the route. The algorithm to determine that
    * one address is upto the implementer
-   * @param route
+   * @param routeId
    * @return
    */
   public R getARoute(I routeId);
 
   public void registerRouteChangeListener(RouteChangeListener listener);
 
-  public class DuplicateRouteException extends Exception {}
+  public class DuplicateRouteException extends RoutingTableException {
+      public DuplicateRouteException(String message) {
+          super(message);
+      }
+
+  }
+
 }