Removed the old openflowj protocol library

Change-Id: I4fcd0399c6eb0d9089116e365b55505042ded1fc
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowProgrammer.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowProgrammer.java
index 4a62947..5711287 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowProgrammer.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowProgrammer.java
@@ -160,7 +160,6 @@
             synchronizer.interrupt(sw);
         }
         pusher.deleteQueue(sw, true);
-        pusher.invalidate(sw);
     }
 
     @Override
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
index 17bbc1a..419dc43 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
@@ -24,7 +24,6 @@
 import net.floodlightcontroller.core.internal.OFMessageFuture;
 import net.floodlightcontroller.core.module.FloodlightModuleContext;
 import net.floodlightcontroller.threadpool.IThreadPoolService;
-import net.floodlightcontroller.util.OFMessageDamper;
 import net.onrc.onos.core.intent.FlowEntry;
 import net.onrc.onos.core.util.Pair;
 
@@ -55,13 +54,6 @@
     private static final Logger log = LoggerFactory.getLogger(FlowPusher.class);
     protected static final int DEFAULT_NUMBER_THREAD = 1;
 
-    // TODO: Values copied from elsewhere (class LearningSwitch).
-    // The local copy should go away!
-    //
-    protected static final int OFMESSAGE_DAMPER_CAPACITY = 10000; // TODO: find
-                                                                  // sweet spot
-    protected static final int OFMESSAGE_DAMPER_TIMEOUT = 250; // ms
-
     // Number of messages sent to switch at once
     protected static final int MAX_MESSAGE_SEND = 100;
 
@@ -251,7 +243,6 @@
     }
 
     private FloodlightModuleContext context = null;
-    private OFMessageDamper messageDamper = null;
     private IThreadPoolService threadPool = null;
     private IFloodlightProviderService floodlightProvider = null;
     protected Map<OFVersion, OFFactory> ofFactoryMap = null;
@@ -346,8 +337,6 @@
 
                     OFMessage msg = queueEntry.getOFMessage();
                     try {
-                        // TODO BOC do we need to use the message damper?
-                        // messageDamper.write(sw, msg, context);
                         sw.write(msg, null);
                         if (log.isTraceEnabled()) {
                             log.trace("Pusher sends message to switch {}: {}", sw.getStringId(), msg);
@@ -415,22 +404,11 @@
         this.floodlightProvider = context
                 .getServiceImpl(IFloodlightProviderService.class);
         this.threadPool = context.getServiceImpl(IThreadPoolService.class);
-        this.messageDamper = null;
 
         ofFactoryMap = new HashMap<>();
         ofFactoryMap.put(OFVersion.OF_10, floodlightProvider.getOFMessageFactory_10());
         ofFactoryMap.put(OFVersion.OF_13, floodlightProvider.getOFMessageFactory_13());
         floodlightProvider.addOFMessageListener(OFType.BARRIER_REPLY, this);
-
-        // TODO BOC message damper may not be needed...
-        // if (damper != null) {
-        // messageDamper = damper;
-        // } else {
-        // use default values
-        /*messageDamper = new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY,
-                EnumSet.of(OFType.FLOW_MOD),
-                OFMESSAGE_DAMPER_TIMEOUT);*/
-        // }
     }
 
     /**
@@ -584,16 +562,6 @@
         }
     }
 
-    /**
-     * Invalidate.
-     * <p>
-     * @param sw switch
-     * @see OFMessageDamper#invalidate(IOFSwitch)
-     */
-    public void invalidate(IOFSwitch sw) {
-        // messageDamper.invalidate(sw); currently a null ptr - commenting out
-    }
-
     @Override
     public boolean add(IOFSwitch sw, OFMessage msg) {
         return add(sw, msg, MsgPriority.NORMAL);
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
index 7b2bfd0..0441ddc 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
@@ -1,9 +1,7 @@
 package net.onrc.onos.core.flowprogrammer;
 
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.Callable;
@@ -11,16 +9,7 @@
 import java.util.concurrent.FutureTask;
 
 import net.floodlightcontroller.core.IOFSwitch;
-import net.onrc.onos.core.util.FlowEntryId;
 
-import org.openflow.protocol.OFFlowMod;
-import org.openflow.protocol.OFMatch;
-import org.openflow.protocol.OFPort;
-import org.openflow.protocol.OFStatisticsRequest;
-import org.openflow.protocol.statistics.OFFlowStatisticsReply;
-import org.openflow.protocol.statistics.OFFlowStatisticsRequest;
-import org.openflow.protocol.statistics.OFStatistics;
-import org.openflow.protocol.statistics.OFStatisticsType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -193,7 +182,7 @@
          */
         private Set<FlowEntryWrapper> getFlowEntriesFromSwitch() {
 
-            int lengthU = 0;
+            /*int lengthU = 0;
             OFMatch match = new OFMatch();
             match.setWildcards(OFMatch.OFPFW_ALL);
 
@@ -209,7 +198,7 @@
             req.setStatisticType(OFStatisticsType.FLOW);
             req.setStatistics(stats);
             lengthU += req.getLengthU();
-            req.setLengthU(lengthU);
+            req.setLengthU(lengthU);*/
 
             //List<OFStatistics> entries = null;
             // XXX S when we fix stats, we fix this
@@ -245,10 +234,10 @@
      * by FlowEntryId (from GraphDB) or OFFlowStatisticsReply (from switch).
      */
     static class FlowEntryWrapper {
-        FlowEntryId flowEntryId;
+        //FlowEntryId flowEntryId;
         // TODO: fix when FlowSynchronizer is refactored
         // IFlowEntry iFlowEntry;
-        OFFlowStatisticsReply statisticsReply;
+        //OFFlowStatisticsReply statisticsReply;
 
 
         // TODO: fix when FlowSynchronizer is refactored
@@ -259,10 +248,10 @@
     }
          */
 
-        public FlowEntryWrapper(OFFlowStatisticsReply entry) {
+        /*public FlowEntryWrapper(OFFlowStatisticsReply entry) {
             flowEntryId = new FlowEntryId(entry.getCookie());
             statisticsReply = entry;
-        }
+        }*/
 
         /**
          * Install this FlowEntry to a switch via FlowPusher.
@@ -272,13 +261,13 @@
         double dbTime, extractTime, pushTime;
 
         public void addToSwitch(IOFSwitch sw) {
-            if (statisticsReply != null) {
+            /*if (statisticsReply != null) {
                 log.error("Error adding existing flow entry {} to sw {}",
                         statisticsReply.getCookie(), sw.getId());
                 return;
             }
 
-            double startDB = System.nanoTime();
+            double startDB = System.nanoTime();*/
             // Get the Flow Entry state from the Network Graph
             // TODO: fix when FlowSynchronizer is refactored
             /*
@@ -293,7 +282,7 @@
             }
         }
              */
-            dbTime = System.nanoTime() - startDB;
+            //dbTime = System.nanoTime() - startDB;
 
             //
             // TODO: The old FlowDatabaseOperation class is gone, so the code
@@ -321,7 +310,7 @@
          * @param sw Switch from which flow will be removed.
          */
         public void removeFromSwitch(IOFSwitch sw) {
-            if (statisticsReply == null) {
+            /*if (statisticsReply == null) {
                 log.error("Error removing non-existent flow entry {} from sw {}",
                         flowEntryId, sw.getId());
                 return;
@@ -334,7 +323,7 @@
             fm.setLengthU(OFFlowMod.MINIMUM_LENGTH);
             fm.setMatch(statisticsReply.getMatch());
             fm.setPriority(statisticsReply.getPriority());
-            fm.setOutPort(OFPort.OFPP_NONE);
+            fm.setOutPort(OFPort.OFPP_NONE);*/
 
             // XXX BOC commented out pending FlowSync refactor
             //pusher.add(sw, fm, MsgPriority.HIGH);
@@ -345,7 +334,8 @@
          */
         @Override
         public int hashCode() {
-            return flowEntryId.hashCode();
+            //return flowEntryId.hashCode();
+            return 0;
         }
 
         /**
@@ -358,16 +348,18 @@
         @Override
         public boolean equals(Object obj) {
             if (obj != null && obj.getClass() == this.getClass()) {
-                FlowEntryWrapper entry = (FlowEntryWrapper) obj;
+                //FlowEntryWrapper entry = (FlowEntryWrapper) obj;
                 // TODO: we need to actually compare the match + actions
-                return this.flowEntryId.equals(entry.flowEntryId);
+                //return this.flowEntryId.equals(entry.flowEntryId);
+                return true;
             }
             return false;
         }
 
         @Override
         public String toString() {
-            return flowEntryId.toString();
+            //return flowEntryId.toString();
+            return "";
         }
     }
 }
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoInterruptResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoInterruptResource.java
index f2b4631..537167b 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoInterruptResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoInterruptResource.java
@@ -2,7 +2,7 @@
 
 import net.floodlightcontroller.core.IOFSwitch;
 
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
 import org.restlet.resource.Get;
 
 /**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoSynchronizeResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoSynchronizeResource.java
index 51d39d8..956a7fb 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoSynchronizeResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoSynchronizeResource.java
@@ -2,7 +2,7 @@
 
 import net.floodlightcontroller.core.IOFSwitch;
 
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
 import org.restlet.resource.Get;
 
 /**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/ResumePusherResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/ResumePusherResource.java
index a9e6c81..ecfec7e 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/ResumePusherResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/ResumePusherResource.java
@@ -2,7 +2,7 @@
 
 import net.floodlightcontroller.core.IOFSwitch;
 
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
 import org.restlet.resource.Get;
 
 /**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SendBarrierResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SendBarrierResource.java
index 4fc6782..bdcdcb6 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SendBarrierResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SendBarrierResource.java
@@ -2,8 +2,8 @@
 
 import net.floodlightcontroller.core.IOFSwitch;
 
-import org.openflow.util.HexString;
 import org.projectfloodlight.openflow.protocol.OFBarrierReply;
+import org.projectfloodlight.openflow.util.HexString;
 import org.restlet.resource.Get;
 
 /**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SetPushRateResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SetPushRateResource.java
index a2993a5..63717a1 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SetPushRateResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SetPushRateResource.java
@@ -2,7 +2,7 @@
 
 import net.floodlightcontroller.core.IOFSwitch;
 
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
 import org.restlet.resource.Get;
 
 /**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
index ba752e6..e1aa320 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
@@ -2,7 +2,7 @@
 
 import net.floodlightcontroller.core.IOFSwitch;
 
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
 import org.restlet.resource.Get;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;