Extensibility support (serialization part)
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / core / TcpHandler.java
index 0ae503a8a91fe661ddd0d633583a9560b3c7c47b..4e9b2bfd3e946c4b28bfda7dc9244fad903c7e11 100644 (file)
@@ -1,4 +1,11 @@
-/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 package org.opendaylight.openflowjava.protocol.impl.core;
 
 import io.netty.bootstrap.ServerBootstrap;
@@ -15,6 +22,7 @@ import java.net.InetSocketAddress;
 
 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
 import org.opendaylight.openflowjava.protocol.impl.connection.ServerFacade;
+import org.opendaylight.openflowjava.protocol.impl.serialization.SerializationFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -105,7 +113,6 @@ public class TcpHandler implements ServerFacade {
      */
     @Override
     public void run() {
-        LOGGER.info("Switch ");
         bossGroup = new NioEventLoopGroup();
         workerGroup = new NioEventLoopGroup();
         try {
@@ -204,8 +211,24 @@ public class TcpHandler implements ServerFacade {
         channelInitializer.setSwitchConnectionHandler(switchConnectionHandler);
     }
     
+    /**
+     * @param switchIdleTimeout in milliseconds
+     */
     public void setSwitchIdleTimeout(long switchIdleTimeout) {
         channelInitializer.setSwitchIdleTimeout(switchIdleTimeout);
     }
+
+    /**
+     * @param tlsSupported
+     */
+    public void setEncryption(boolean tlsSupported) {
+        channelInitializer.setEncryption(tlsSupported);
+    }
     
+    /**
+     * @param sf serialization factory
+     */
+    public void setSerializationFactory(SerializationFactory sf) {
+        channelInitializer.setSerializationFactory(sf);
+    }
 }