*/
@Override()
public boolean isConfigurationAcceptable(ConnectionHandlerCfg configuration,
List<Message> unacceptableReasons)
{
LDAPConnectionHandlerCfg config = (LDAPConnectionHandlerCfg) configuration;
// Attempt to bind to the listen port on all configured addresses to
// verify whether the connection handler will be able to start.
if ((currentConfig == null) ||
(!currentConfig.isEnabled() && config.isEnabled())) {
for (InetAddress a : config.getListenAddress()) {
try {
if (StaticUtils.isAddressInUse(a, config.getListenPort(),
config.isAllowTCPReuseAddress())) {
throw new IOException(
ERR_CONNHANDLER_ADDRESS_INUSE.get().toString());
}
} catch (IOException e) {
if (debugEnabled()) {
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
Message message = ERR_LDAP_CONNHANDLER_CANNOT_BIND.get(
String.valueOf(config.dn()), a.getHostAddress(),
config.getListenPort(), getExceptionMessage(e));
unacceptableReasons.add(message);
return false;
}
}
}