-
/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
public ControllerIO(IController l) {
this.listener = l;
this.openFlowPort = defaultOpenFlowPort;
- String portString = System.getProperty("port");
+ String portString = System.getProperty("of.listenPort");
if (portString != null) {
try {
openFlowPort = Short.decode(portString).shortValue();
} catch (NumberFormatException e) {
- logger.warn("Invalid port:" + portString + ", use default("
- + openFlowPort + ")");
+ logger.warn("Invalid port:{}, use default({})", portString,
+ openFlowPort);
}
}
}
SelectionKey skey = selectedKeys.next();
selectedKeys.remove();
if (skey.isValid() && skey.isAcceptable()) {
- ((Controller) listener).handleNewConnection(selector,
- serverSelectionKey);
+ ((Controller) listener).handleNewConnection(
+ selector, serverSelectionKey);
}
}
} catch (Exception e) {
}
}, "ControllerI/O Thread");
controllerIOThread.start();
- logger.info("Controller is now listening on port " + openFlowPort);
+ logger.info("Controller is now listening on port {}", openFlowPort);
}
public void shutDown() throws IOException {