*
*/
public void start() {
- logger.debug("Starting!");
+ logger.debug("Starting! - omitting whole startup");
/*
* start a thread to handle event coming from the switch
*/
- switchEventThread = new Thread(new EventHandler(), "SwitchEvent Thread");
- switchEventThread.start();
-
- // spawn a thread to start to listen on the open flow port
- controllerIO = new ControllerIO(this);
- try {
- controllerIO.start();
- } catch (IOException ex) {
- logger.error("Caught exception while starting:", ex);
- }
+// switchEventThread = new Thread(new EventHandler(), "SwitchEvent Thread");
+// switchEventThread.start();
+//
+// // spawn a thread to start to listen on the open flow port
+// controllerIO = new ControllerIO(this);
+// try {
+// controllerIO.start();
+// } catch (IOException ex) {
+// logger.error("Caught exception while starting:", ex);
+// }
}
/**
}
};
}
+
+ /**
+ * @return default connection configuration
+ */
+ public static ConnectionConfiguration getLegacy() {
+ return new ConnectionConfiguration() {
+
+ @Override
+ public InetAddress getAddress() {
+ // all interfaces
+ return null;
+ }
+
+ @Override
+ public int getPort() {
+ return LEGACY_OF_PORT;
+ }
+
+ @Override
+ public FEATURE_SUPPORT getTlsSupport() {
+ return FEATURE_SUPPORT.NOT_SUPPORTED;
+ }
+
+ @Override
+ public Object getTransferProtocol() {
+ // TODO:: TCP/UDP ...
+ return null;
+ }
+
+ @Override
+ public long getSwitchIdleTimeout() {
+ return 5000;
+ }
+
+ @Override
+ public Object getSslContext() {
+ return null;
+ }
+ };
+ }
}
private static Collection<ConnectionConfiguration> getConnectionConfiguration() {
// TODO:: get config from state manager
ConnectionConfiguration configuration = ConnectionConfigurationFactory.getDefault();
- return Lists.newArrayList(configuration);
+ ConnectionConfiguration configurationLegacy = ConnectionConfigurationFactory.getLegacy();
+ return Lists.newArrayList(configuration, configurationLegacy);
}
/**