String keystorePath = serverConfig.getKeystorePath();
String keystorePassword = serverConfig.getKeystorePassword();
String certType = serverConfig.getCertType();
SSLContextFactory sslFactory = null;
if (!serverConfig.getSSLOnly())
{
for(int port : ports)
{
NetworkDriver driver = new MINANetworkDriver();
Set<VERSION> supported = EnumSet.allOf(VERSION.class);
if(exclude_0_10.contains(port))
{
supported.remove(VERSION.v0_10);
}
if(exclude_0_9_1.contains(port))
{
supported.remove(VERSION.v0_9_1);
}
if(exclude_0_9.contains(port))
{
supported.remove(VERSION.v0_9);
}
if(exclude_0_8.contains(port))
{
supported.remove(VERSION.v0_8);
}
MultiVersionProtocolEngineFactory protocolEngineFactory =
new MultiVersionProtocolEngineFactory(hostName, supported);
driver.bind(port, new InetAddress[]{bindAddress}, protocolEngineFactory,
serverConfig.getNetworkConfiguration(), null);
ApplicationRegistry.getInstance().addAcceptor(new InetSocketAddress(bindAddress, port),
new QpidAcceptor(driver,"TCP"));
//CurrentActor.get().message(BrokerMessages.LISTENING("TCP", port));
_logger.info("Qpid broker TCP port : " + port);
}
}
if (serverConfig.getEnableSSL())
{
sslFactory = new SSLContextFactory(keystorePath, keystorePassword, certType);
NetworkDriver driver = new MINANetworkDriver();
//int port = serverConfig.getSSLPort();
String sslPort = commandLine.getOptionValue("s");
int port = 0;