Another round of ofp-impl warning fixes
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / connection / ConnectionManagerImpl.java
index e2f9e2b881134743d4bf63b2a4f9800300600199..0f54f01a94e5c25aa7226bb0344219590386cbe3 100644 (file)
@@ -29,6 +29,7 @@ import org.opendaylight.mdsal.binding.api.NotificationPublishService;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionReadyListener;
+import org.opendaylight.openflowjava.protocol.impl.core.SslContextFactory;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionManager;
@@ -117,6 +118,7 @@ public class ConnectionManagerImpl implements ConnectionManager {
         final SystemNotificationsListener systemListener = new SystemNotificationsListenerImpl(connectionContext,
                 config.getEchoReplyTimeout().getValue().toJava(), executorService, notificationPublishService);
         connectionAdapter.setSystemListener(systemListener);
+        SslContextFactory.setIsCustomTrustManagerEnabled(config.getEnableCustomTrustManager());
 
         LOG.trace("connection ballet finished");
     }
@@ -182,22 +184,22 @@ public class ConnectionManagerImpl implements ConnectionManager {
         }
 
         @Override
-        public LocalDateTime getDeviceLastConnectionTime(BigInteger nodeId) {
+        public LocalDateTime getDeviceLastConnectionTime(final BigInteger nodeId) {
             return deviceConnectionMap.get(nodeId);
         }
 
         @Override
-        public void addDeviceLastConnectionTime(BigInteger nodeId, LocalDateTime time) {
+        public void addDeviceLastConnectionTime(final BigInteger nodeId, final LocalDateTime time) {
             deviceConnectionMap.put(nodeId, time);
         }
 
         @Override
-        public void removeDeviceLastConnectionTime(BigInteger nodeId) {
+        public void removeDeviceLastConnectionTime(final BigInteger nodeId) {
             deviceConnectionMap.remove(nodeId);
         }
 
         @Override
-        public void onDataTreeChanged(@NonNull Collection<DataTreeModification<Node>> changes) {
+        public void onDataTreeChanged(@NonNull final Collection<DataTreeModification<Node>> changes) {
             Preconditions.checkNotNull(changes, "Changes must not be null!");
             for (DataTreeModification<Node> change : changes) {
                 final DataObjectModification<Node> mod = change.getRootNode();
@@ -219,7 +221,7 @@ public class ConnectionManagerImpl implements ConnectionManager {
             return InstanceIdentifier.create(Nodes.class).child(Node.class);
         }
 
-        private void processNodeModification(DataTreeModification<Node> change) {
+        private void processNodeModification(final DataTreeModification<Node> change) {
             final InstanceIdentifier<Node> key = change.getRootPath().getRootIdentifier();
             final InstanceIdentifier<Node> nodeIdent = key.firstIdentifierOf(Node.class);
             String[] nodeIdentity = nodeIdent.firstKeyOf(Node.class).getId().getValue().split(":");