Implementation of the route service
Change-Id: I4e905cf868ad69c426e4f4155dfd83e1f8b00335
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteService.java b/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteService.java
index 3fd9e69..d4d6892 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteService.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteService.java
@@ -20,47 +20,28 @@
import org.onosproject.event.ListenerService;
import java.util.Collection;
+import java.util.Map;
/**
- * IP unicast routing service.
+ * Unicast IP route service.
*/
public interface RouteService extends ListenerService<RouteEvent, RouteListener> {
/**
- * Gets all routes.
+ * Returns all routes for all route tables in the system.
*
- * @return collection of all routes
+ * @return map of route table name to routes in that table
*/
- Collection<Route> getRoutes();
+ Map<RouteTableId, Collection<Route>> getAllRoutes();
/**
- * Gets routes learnt from a particular source.
+ * Performs a longest prefix match on the given IP address. The call will
+ * return the route with the most specific prefix that contains the given
+ * IP address.
*
- * @param source route source
- * @return collection of routes
- */
- Collection<Route> getRoutesFromSource(Route.Source source);
-
- /**
- * Gets the longest prefix route that matches the given IP address.
- *
- * @param ip IP addres
+ * @param ip IP address
* @return longest prefix matched route
*/
Route longestPrefixMatch(IpAddress ip);
- //TODO should mutation methods be pushed to a different interface?
- /**
- * Updates the given routes in the route service.
- *
- * @param routes collection of routes to update
- */
- void update(Collection<Route> routes);
-
- /**
- * Withdraws the given routes from the route service.
- *
- * @param routes collection of routes to withdraw
- */
- void withdraw(Collection<Route> routes);
}