/** * The hostname of this address. If the hostname is null the local machines * IP address is returned. * * @return the text representation of the hostname associated with this address */ public String getHostName() { /* 2010 - We no longer try a Node Status to get the * hostname because apparently some servers do not respond * anymore. I think everyone post Windows 98 will accept * an IP address as the tconHostName which is the principal * use of this method. */ if (hostName == UNKNOWN_NAME) { return getHostAddress(); } return hostName.name; }
/** * To convert this address to an <code>InetAddress</code>. * * @return the {@link java.net.InetAddress} representation of this address. */ public InetAddress getInetAddress() throws UnknownHostException { return InetAddress.getByName( getHostAddress() ); }
/** * To convert this address to an <code>InetAddress</code>. * * @return the {@link java.net.InetAddress} representation of this address. * @throws UnknownHostException */ public InetAddress getInetAddress () throws UnknownHostException { return InetAddress.getByName(getHostAddress()); }
/** * To convert this address to an <code>InetAddress</code>. * * @return the {@link java.net.InetAddress} representation of this address. * @throws UnknownHostException */ public InetAddress getInetAddress () throws UnknownHostException { return InetAddress.getByName(getHostAddress()); }
/** * Return the IP address as text such as "192.168.1.15". */ public String getHostAddress() { if( addr instanceof NbtAddress ) { return ((NbtAddress)addr).getHostAddress(); } return ((InetAddress)addr).getHostAddress(); }
/** * To convert this address to an <code>InetAddress</code>. * * @return the {@link java.net.InetAddress} representation of this address. */ public InetAddress getInetAddress() throws UnknownHostException { return InetAddress.getByName( getHostAddress() ); }
/** * To convert this address to an <code>InetAddress</code>. * * @return the {@link java.net.InetAddress} representation of this address. */ public InetAddress getInetAddress() throws UnknownHostException { return InetAddress.getByName( getHostAddress() ); }
/** * Return the IP address as text such as "192.168.1.15". */ public String getHostAddress() { if( addr instanceof NbtAddress ) { return ((NbtAddress)addr).getHostAddress(); } return ((InetAddress)addr).getHostAddress(); }
/** * Return the IP address as text such as "192.168.1.15". * * @return the ip address */ @Override public String getHostAddress () { if ( this.addr instanceof NbtAddress ) { return ( (NbtAddress) this.addr ).getHostAddress(); } return ( (InetAddress) this.addr ).getHostAddress(); }
/** * Return the IP address as text such as "192.168.1.15". */ public String getHostAddress() { if( addr instanceof NbtAddress ) { return ((NbtAddress)addr).getHostAddress(); } return ((InetAddress)addr).getHostAddress(); }
/** * Return the IP address as text such as "192.168.1.15". */ public String getHostAddress() { if( addr instanceof NbtAddress ) { return ((NbtAddress)addr).getHostAddress(); } return ((InetAddress)addr).getHostAddress(); }
/** * Return the IP address as text such as "192.168.1.15". * * @return the ip address */ @Override public String getHostAddress () { if ( this.addr instanceof NbtAddress ) { return ( (NbtAddress) this.addr ).getHostAddress(); } return ( (InetAddress) this.addr ).getHostAddress(); }
/** * To convert this address to an <code>InetAddress</code>. * * @return the {@link java.net.InetAddress} representation of this address. */ public InetAddress getInetAddress() throws UnknownHostException { return InetAddress.getByName( getHostAddress() ); }
/** * Returns the {@link java.lang.String} representaion of this address. */ public String toString() { return hostName.toString() + "/" + getHostAddress(); } }
/** * Returns the {@link java.lang.String} representaion of this address. */ public String toString() { return hostName.toString() + "/" + getHostAddress(); } }
/** * Returns the {@link java.lang.String} representaion of this address. */ public String toString() { return hostName.toString() + "/" + getHostAddress(); } }
/** * Returns the {@link java.lang.String} representaion of this address. */ @Override public String toString () { return this.hostName.toString() + "/" + getHostAddress(); } }
/** * Returns the {@link java.lang.String} representaion of this address. */ @Override public String toString () { return this.hostName.toString() + "/" + getHostAddress(); } }
/** * Returns the {@link java.lang.String} representaion of this address. */ public String toString() { return hostName.toString() + "/" + getHostAddress(); } }
@SneakyThrows private UniAddress getUniAddress() { if (this.loadBalance) { if (StringUtils.isNotBlank(this.includePattern)) { val dcs = NbtAddress.getAllByName(this.domainController, NBT_ADDRESS_TYPE, null, null); return Arrays.stream(dcs) .filter(dc2 -> dc2.getHostAddress().matches(this.includePattern)) .findFirst() .map(UniAddress::new) .orElse(null); } return new UniAddress(NbtAddress.getByName(this.domainController, NBT_ADDRESS_TYPE, null)); } return UniAddress.getByName(this.domainController, true); }