Fixed "Intent" problem: Add flow removed event by using "DEL_ACK".
Fixed "Fowarding" to make it work on changed "Intent".
Did cleanup some of "Intent" measurement code.
Deleted unused receiver in FlowProgrammer.java.

Memo:
ReactiveForwarding can set idle timeout.
You can specify it from 1 ~ second.
Out of this range, the application set it to 5 sec (default).

Sample: (in onos.properties file)
net.onrc.onos.apps.forwarding.Forwarding.idletimeout = 5

When you test, please be careful we only set the value to the first switch and the other switches has +2 second idle timeout values.

Change-Id: I1b261a8c771356a412af004c7c0cd93b539ebba7
diff --git a/src/main/java/net/onrc/onos/core/intent/FlowEntry.java b/src/main/java/net/onrc/onos/core/intent/FlowEntry.java
index bb051e2..94cf88a 100644
--- a/src/main/java/net/onrc/onos/core/intent/FlowEntry.java
+++ b/src/main/java/net/onrc/onos/core/intent/FlowEntry.java
@@ -21,6 +21,7 @@
     protected Operator operator;
     protected int hardTimeout = 0;
     protected int idleTimeout = 0;
+    protected long flowEntryId;
 
     public FlowEntry(long sw, long srcPort, long dstPort,
                      MACAddress srcMac, MACAddress dstMac,
@@ -30,13 +31,13 @@
         this.actions = new HashSet<Action>();
         this.actions.add(new ForwardAction(dstPort));
         this.operator = operator;
-
+        this.flowEntryId = hashCode();
     }
 
     /***
      * Gets hard timeout value in seconds.
      *
-     * @return hardTimeout
+     * @return the hard timeout value in seconds
      */
     public int getHardTimeout() {
         return hardTimeout;
@@ -45,7 +46,7 @@
     /***
      * Gets idle timeout value in seconds.
      *
-     * @return idleTimeout
+     * @return the idle timeout value in seconds
      */
     public int getIdleTimeout() {
         return idleTimeout;
@@ -54,7 +55,7 @@
     /***
      * Sets hard timeout value in seconds.
      *
-     * @param hardTimeout
+     * @param the hard timeout value in seconds
      */
     public void setHardTimeout(int hardTimeout) {
         this.hardTimeout = hardTimeout;
@@ -63,12 +64,30 @@
     /***
      * Sets idle timeout value in seconds.
      *
-     * @param idleTimeout
+     * @param the idle timeout value in seconds
      */
     public void setIdleTimeout(int idleTimeout) {
         this.idleTimeout = idleTimeout;
     }
 
+    /***
+     * Gets flowEntryId.
+     *
+     * @param the flowEntryId to be set in cookie
+     */
+    public long getFlowEntryId() {
+        return flowEntryId;
+    }
+
+    /***
+     * Sets flowEntryId.
+     *
+     * @param the flowEntryId to be set in cookie
+     */
+    public void setFlowEntryId(long flowEntryId) {
+        this.flowEntryId = flowEntryId;
+    }
+
     @Override
     public String toString() {
         return match + "->" + actions;
@@ -89,7 +108,7 @@
     public net.onrc.onos.core.util.FlowEntry getFlowEntry() {
         net.onrc.onos.core.util.FlowEntry entry = new net.onrc.onos.core.util.FlowEntry();
         entry.setDpid(new Dpid(sw));
-        entry.setFlowEntryId(new FlowEntryId(hashCode())); // naive, but useful for now
+        entry.setFlowEntryId(new FlowEntryId(flowEntryId));
         entry.setFlowEntryMatch(match.getFlowEntryMatch());
         FlowEntryActions flowEntryActions = new FlowEntryActions();
         for (Action action : actions) {