Ditch use of SystemNotificationsListener
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / connection / ConnectionManagerImpl.java
index f68b00fe7ac77ce7ee611883351937d8df329b6b..3810f3e08fec5a5a781636cf8348a677d88d68b7 100644 (file)
@@ -46,8 +46,6 @@ import org.opendaylight.openflowplugin.impl.connection.listener.OpenflowProtocol
 import org.opendaylight.openflowplugin.impl.connection.listener.SystemNotificationsListenerImpl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolListener;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.system.rev130927.SystemNotificationsListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.OpenflowProviderConfig;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -111,13 +109,11 @@ public class ConnectionManagerImpl implements ConnectionManager {
                 connectionContext, handshakeContext);
         connectionAdapter.setConnectionReadyListener(connectionReadyListener);
 
-        final OpenflowProtocolListener ofMessageListener =
-                new OpenflowProtocolListenerInitialImpl(connectionContext, handshakeContext);
-        connectionAdapter.setMessageListener(ofMessageListener);
+        connectionAdapter.setMessageListener(
+            new OpenflowProtocolListenerInitialImpl(connectionContext, handshakeContext));
 
-        final SystemNotificationsListener systemListener = new SystemNotificationsListenerImpl(connectionContext,
-                config.getEchoReplyTimeout().getValue().toJava(), executorService, notificationPublishService);
-        connectionAdapter.setSystemListener(systemListener);
+        connectionAdapter.setSystemListener(new SystemNotificationsListenerImpl(connectionContext,
+                config.getEchoReplyTimeout().getValue().toJava(), executorService, notificationPublishService));
 
         LOG.trace("connection ballet finished");
     }