/** * Determine all of the addresses that this host represents. An empty list * will be regarded as an error by all who see it. * * @return list of addresses for this host * @since 5.7 */ public static Set getMyAddresses(DistributionManager dm) { try { Set addresses = SocketCreator.getMyAddresses(); return addresses; } catch (IllegalArgumentException e) { logger.fatal(e.getMessage(), e); return Collections.EMPTY_SET; } }
protected void checkServerBindAddress(String value) { _checkIfModifiable(SERVER_BIND_ADDRESS_NAME); if (value != null && value.length() > 0 && !SocketCreator.isLocalHost(value)) { throw new IllegalArgumentException( LocalizedStrings.AbstractDistributionConfig_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1 .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses(true) })); } } public boolean isServerBindAddressModifiable() {
protected void checkServerBindAddress(String value) { _checkIfModifiable(SERVER_BIND_ADDRESS_NAME); if (value != null && value.length() > 0 && !SocketCreator.isLocalHost(value)) { throw new IllegalArgumentException( LocalizedStrings.AbstractDistributionConfig_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1 .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses() })); } } public boolean isServerBindAddressModifiable() {
protected void checkMemcachedBindAddress(String value) { _checkIfModifiable(MEMCACHED_BIND_ADDRESS_NAME); if (value != null && value.length() > 0 && !SocketCreator.isLocalHost(value)) { throw new IllegalArgumentException( LocalizedStrings.AbstractDistributionConfig_MEMCACHED_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1 .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses() })); } } public boolean isMemcachedBindAddressModifiable() {
protected void checkBindAddress(String value) { _checkIfModifiable(BIND_ADDRESS_NAME); if (value != null && value.length() > 0 && !SocketCreator.isLocalHost(value)) { throw new IllegalArgumentException( LocalizedStrings.AbstractDistributionConfig_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1 .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses(true) })); } } public boolean isBindAddressModifiable() {
protected void checkBindAddress(String value) { _checkIfModifiable(BIND_ADDRESS_NAME); if (value != null && value.length() > 0 && !SocketCreator.isLocalHost(value)) { throw new IllegalArgumentException( LocalizedStrings.AbstractDistributionConfig_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1 .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses() })); } } public boolean isBindAddressModifiable() {
protected void checkHttpServiceBindAddress(String value) { _checkIfModifiable(HTTP_SERVICE_BIND_ADDRESS_NAME); if (value != null && value.length() > 0 && !SocketCreator.isLocalHost(value)) { throw new IllegalArgumentException( LocalizedStrings.AbstractDistributionConfig_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1 .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses() })); } }
protected void checkRedisBindAddress(String value) { _checkIfModifiable(REDIS_BIND_ADDRESS_NAME); if (value != null && value.length() > 0 && !SocketCreator.isLocalHost(value)) { throw new IllegalArgumentException( LocalizedStrings.AbstractDistributionConfig_REDIS_BIND_ADDRESS_0_INVALID_MUST_BE_IN_1 .toLocalizedString(new Object[]{value, SocketCreator.getMyAddresses() })); } }
/** * Determine all of the addresses that this host represents. An empty list * will be regarded as an error by all who see it. * * @return list of addresses for this host * @since 5.7 */ public static Set getMyAddresses(DistributionManager dm) { try { Set addresses = SocketCreator.getMyAddresses(false); return addresses; } catch (IllegalArgumentException e) { dm.getLoggerI18n().severe(e); return Collections.EMPTY_SET; } }