SONAR TD - AbstractService
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / connection / HandshakeContextImpl.java
index e7142642b85c6010eaac4735bbb8de3e379c771f..1efadcc18b3a70c5a1c432201b5b4da13f129b14 100644 (file)
@@ -8,19 +8,13 @@
 package org.opendaylight.openflowplugin.impl.connection;
 
 import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
 import org.opendaylight.openflowplugin.api.openflow.connection.HandshakeContext;
 import org.opendaylight.openflowplugin.api.openflow.md.core.HandshakeManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  *
  */
 public class HandshakeContextImpl implements HandshakeContext {
-
-    private static final Logger LOG = LoggerFactory.getLogger(HandshakeContextImpl.class);
-
     private ThreadPoolExecutor handshakePool;
     private HandshakeManager handshakeManager;
 
@@ -44,23 +38,6 @@ public class HandshakeContextImpl implements HandshakeContext {
     }
 
     @Override
-    public void close() throws Exception {
-        shutdownPoolPolitely();
-    }
-
-    private void shutdownPoolPolitely() {
-        LOG.debug("terminating handshake pool");
-        handshakePool.shutdown();
-        try {
-            handshakePool.awaitTermination(1, TimeUnit.SECONDS);
-        } catch (InterruptedException e) {
-            LOG.error("Error while awaiting termination on pool. Will use shutdownNow method.");
-        } finally {
-            handshakePool.purge();
-            if (! handshakePool.isTerminated()) {
-                handshakePool.shutdownNow();
-            }
-            LOG.debug("pool is terminated: {}", handshakePool.isTerminated());
-        }
+    public void close() {
     }
 }