Add a new method sendMsg(OFMessage msg, TableType type) in OpenFlowSwitch interface to support multiple-table aware FlowRuleService.
  Other changes are caused due to the new method.
Add type() in FlowRule interface to determine the table in which the flow rule need to be set.

Change-Id: I6518a01f4a5fba23f09f70b619f3844b5e33ce8f
diff --git a/openflow/api/src/main/java/org/onosproject/openflow/controller/OpenFlowSwitch.java b/openflow/api/src/main/java/org/onosproject/openflow/controller/OpenFlowSwitch.java
index 11cb705..f020a1a 100644
--- a/openflow/api/src/main/java/org/onosproject/openflow/controller/OpenFlowSwitch.java
+++ b/openflow/api/src/main/java/org/onosproject/openflow/controller/OpenFlowSwitch.java
@@ -27,6 +27,22 @@
 public interface OpenFlowSwitch {
 
     /**
+     * The TableType is used to determine in which table (TableID) each flow rule
+     * needs to be put for multi-table support switch.
+     * It is used only for multi-table support switch.
+     */
+    public static enum TableType {
+        /* IP table */
+        IP,
+        /* MPLS table */
+        MPLS,
+        /* ACL table */
+        ACL,
+        /* Single table */
+        NONE,
+    }
+
+    /**
      * Writes the message to the driver.
      *
      * @param msg the message to write
@@ -41,6 +57,16 @@
     public void sendMsg(List<OFMessage> msgs);
 
     /**
+     * Writes to the OFMessage list to the driver.
+     * TableType is used to determine the table ID for the OFMessage.
+     * The switch driver that supports multi-table should implement the function.
+     *
+     * @param msg the message to be written
+     * @param tableType the type of table in which the OFMessage needs to put
+     */
+    public void sendMsg(OFMessage msg, TableType tableType);
+
+    /**
      * Handle a message from the switch.
      * @param fromSwitch the message to handle
      */