continue;
}
}
Map<String, ProtocolManager> supportedProtocols = new ConcurrentHashMap();
String protocol = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOL_PROP_NAME, null,
info.getParams());
if (protocol != null)
{
HornetQServerLogger.LOGGER.warnDeprecatedProtocol();
ProtocolManager protocolManager = protocolMap.get(protocol);
if (protocolManager == null)
{
throw HornetQMessageBundle.BUNDLE.noProtocolManagerFound(protocol);
}
else
{
supportedProtocols.put(protocol, protocolManager);
}
}
String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null,
info.getParams());
if (protocols != null)
{
String[] actualProtocols = protocols.split(",");
if (actualProtocols != null)
{
for (String actualProtocol : actualProtocols)
{
ProtocolManager protocolManager = protocolMap.get(actualProtocol);
if (protocolManager == null)
{
throw HornetQMessageBundle.BUNDLE.noProtocolManagerFound(actualProtocol);
}
else
{
supportedProtocols.put(actualProtocol, protocolManager);
}
}
}
}
ClusterConnection clusterConnection = lookupClusterConnection(info);
Acceptor acceptor = factory.createAcceptor(info.getName(),
clusterConnection,
info.getParams(),
new DelegatingBufferHandler(),
this,
threadPool,
scheduledThreadPool,
supportedProtocols.isEmpty() ? protocolMap : supportedProtocols);
if (defaultInvmSecurityPrincipal != null && acceptor.isUnsecurable())
{
acceptor.setDefaultHornetQPrincipal(defaultInvmSecurityPrincipal);
}