{
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;
if (null != sslPort) {
port = Integer.parseInt(sslPort);
} else {
port = serverConfig.getSSLPort();
}
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 protoclEngineFactory =
new MultiVersionProtocolEngineFactory(hostName, supported);
driver.bind(port , new InetAddress[]{bindAddress}, protoclEngineFactory,
serverConfig.getNetworkConfiguration(), sslFactory);
ApplicationRegistry.getInstance().addAcceptor(new InetSocketAddress(bindAddress, serverConfig.getSSLPort()),
new QpidAcceptor(driver,"TCP"));
//CurrentActor.get().message(BrokerMessages.LISTENING("TCP/SSL", serverConfig.getSSLPort()));