@Override public String getBrokerName() { if (brokerName == null) { try { brokerName = InetAddressUtil.getLocalHostName().toLowerCase(Locale.ENGLISH); } catch (Exception e) { brokerName = "localhost"; } } return brokerName; }
protected String resolveHostName(String host) throws UnknownHostException { if (isUseLocalHost()) { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && localName.equals(host)) { return "localhost"; } } return host; }
protected String resolveHostName(String host) throws UnknownHostException { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && isUseLocalHost()) { if (localName.equals(host)) { return "localhost"; } } return host; }
/** * @param socket * @param bindAddress * @return real hostName * @throws UnknownHostException */ protected String resolveHostName(ServerSocket socket, InetAddress bindAddress) throws UnknownHostException { String result = null; if (socket.isBound()) { if (socket.getInetAddress().isAnyLocalAddress()) { // make it more human readable and useful, an alternative to 0.0.0.0 result = InetAddressUtil.getLocalHostName(); } else { result = socket.getInetAddress().getCanonicalHostName(); } } else { result = bindAddress.getCanonicalHostName(); } return result; }
if (address.isAnyLocalAddress()) { result = InetAddressUtil.getLocalHostName(); } else { result = address.getHostName(); if (address.isAnyLocalAddress()) { result = InetAddressUtil.getLocalHostName(); } else { result = address.getCanonicalHostName();
@Override public String getBrokerName() { if (brokerName == null) { try { brokerName = InetAddressUtil.getLocalHostName().toLowerCase(); } catch (Exception e) { brokerName = "localhost"; } } return brokerName; }
@Override public String getBrokerName() { if (brokerName == null) { try { brokerName = InetAddressUtil.getLocalHostName().toLowerCase(Locale.ENGLISH); } catch (Exception e) { brokerName = "localhost"; } } return brokerName; }
@Override public String getBrokerName() { if (brokerName == null) { try { brokerName = InetAddressUtil.getLocalHostName().toLowerCase(Locale.ENGLISH); } catch (Exception e) { brokerName = "localhost"; } } return brokerName; }
@Override public String getBrokerName() { if (brokerName == null) { try { brokerName = InetAddressUtil.getLocalHostName().toLowerCase(Locale.ENGLISH); } catch (Exception e) { brokerName = "localhost"; } } return brokerName; }
protected String resolveHostName(String host) throws UnknownHostException { if (isUseLocalHost()) { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && localName.equals(host)) { return "localhost"; } } return host; }
protected String resolveHostName(String host) throws UnknownHostException { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && isUseLocalHost()) { if (localName.equals(host)) { return "localhost"; } } return host; }
protected String resolveHostName(String host) throws UnknownHostException { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && isUseLocalHost()) { if (localName.equals(host)) { return "localhost"; } } return host; }
protected String resolveHostName(String host) throws UnknownHostException { if (isUseLocalHost()) { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && localName.equals(host)) { return "localhost"; } } return host; }
protected String resolveHostName(String host) throws UnknownHostException { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && isUseLocalHost()) { if (localName.equals(host)) { return "localhost"; } } return host; }
protected String resolveHostName(String host) throws UnknownHostException { if (isUseLocalHost()) { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && localName.equals(host)) { return "localhost"; } } return host; }
protected String resolveHostName(String host) throws UnknownHostException { if (isUseLocalHost()) { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && localName.equals(host)) { return "localhost"; } } return host; }
protected String resolveHostName(String host) throws UnknownHostException { String localName = InetAddressUtil.getLocalHostName(); if (localName != null && isUseLocalHost()) { if (localName.equals(host)) { return "localhost"; } } return host; }
/** * @param socket * @param bindAddress * @return real hostName * @throws UnknownHostException */ protected String resolveHostName(ServerSocket socket, InetAddress bindAddress) throws UnknownHostException { String result = null; if (socket.isBound()) { if (socket.getInetAddress().isAnyLocalAddress()) { // make it more human readable and useful, an alternative to 0.0.0.0 result = InetAddressUtil.getLocalHostName(); } else { result = socket.getInetAddress().getCanonicalHostName(); } } else { result = bindAddress.getCanonicalHostName(); } return result; }
/** * @param socket * @param bindAddress * @return real hostName * @throws UnknownHostException */ protected String resolveHostName(ServerSocket socket, InetAddress bindAddress) throws UnknownHostException { String result = null; if (socket.isBound()) { if (socket.getInetAddress().isAnyLocalAddress()) { // make it more human readable and useful, an alternative to 0.0.0.0 result = InetAddressUtil.getLocalHostName(); } else { result = socket.getInetAddress().getCanonicalHostName(); } } else { result = bindAddress.getCanonicalHostName(); } return result; }
/** * @param socket * @param bindAddress * @return real hostName * @throws UnknownHostException */ protected String resolveHostName(ServerSocket socket, InetAddress bindAddress) throws UnknownHostException { String result = null; if (socket.isBound()) { if (socket.getInetAddress().isAnyLocalAddress()) { // make it more human readable and useful, an alternative to 0.0.0.0 result = InetAddressUtil.getLocalHostName(); } else { result = socket.getInetAddress().getCanonicalHostName(); } } else { result = bindAddress.getCanonicalHostName(); } return result; }