return connectors.toArray(new Connector[connectors.size()]);
}
private SelectChannelConnector buildAdminConnector() {
final SelectChannelConnector adminChannel = new SelectChannelConnector();
adminChannel.setPort(getAdminPort(commandLineArgs));
adminChannel.setName(ADMIN_CONNECTOR_NAME);
adminChannel.setHost(DEFAULT_HOST);
if (commandLineArgs.containsKey(CommandLineInterpreter.OPTION_ADDRESS)) {
adminChannel.setHost(commandLineArgs.get(CommandLineInterpreter.OPTION_ADDRESS));
}
final String configured = String.format("Admin portal configured at http://%s:%s",
adminChannel.getHost(), adminChannel.getPort());
ANSITerminal.status(configured);
final String status = String.format("Admin portal status enabled at http://%s:%s/status",
adminChannel.getHost(), adminChannel.getPort());
ANSITerminal.status(status);
currentHost = adminChannel.getHost();
currentAdminPort = adminChannel.getPort();
return adminChannel;
}