Convert OF samples to use DTCL instead of DCL
[openflowplugin.git] / samples / learning-switch / src / main / java / org / opendaylight / openflowplugin / learningswitch / multi / PacketInDispatcherImpl.java
index 30abfdc9bc0e48712c95287c0b52cfd9c0848801..b8058c964b6bc9c2842e5c3c33db2b6d12addb91 100644 (file)
@@ -10,19 +10,15 @@ package org.opendaylight.openflowplugin.learningswitch.multi;
 
 import java.util.HashMap;
 import java.util.Map;
-
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-/**
- * 
- */
 public class PacketInDispatcherImpl implements PacketProcessingListener {
-    
+
     private Map<InstanceIdentifier<Node>, PacketProcessingListener> handlerMapping;
-    
+
     /**
      * default constructor
      */
@@ -36,30 +32,26 @@ public class PacketInDispatcherImpl implements PacketProcessingListener {
         /**
          * Notification contains reference to ingress port
          * in a form of path in inventory: /nodes/node/node-connector
-         * 
+         *
          * In order to get path we shorten path to the first node reference
          * by using firstIdentifierOf helper method provided by InstanceIdentifier,
          * this will effectively shorten the path to /nodes/node.
-         * 
          */
         InstanceIdentifier<?> ingressPort = notification.getIngress().getValue();
         InstanceIdentifier<Node> nodeOfPacket = ingressPort.firstIdentifierOf(Node.class);
         /**
          * We lookup up the the packet-in listener for this node.
-         * 
          */
         PacketProcessingListener nodeHandler = handlerMapping.get(nodeOfPacket);
-        
+
         /**
-         * 
          * If we have packet-processing listener, we delegate notification.
-         * 
          */
         if (nodeHandler != null) {
             nodeHandler.onPacketReceived(notification);
         }
     }
-    
+
     /**
      * @return the handlerMapping
      */