forked from I2P_Developers/i2p.i2p
Switch from 'host name' to 'hostname'
This commit is contained in:
@@ -349,7 +349,7 @@ public interface I2PSession {
|
||||
public Destination lookupDest(Hash h, long maxWait) throws I2PSessionException;
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. Waits a max of 10 seconds by default.
|
||||
*
|
||||
* This only makes sense for a b32 hostname, OR outside router context.
|
||||
@@ -402,7 +402,7 @@ public interface I2PSession {
|
||||
public Destination lookupDest(String name) throws I2PSessionException;
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. See above for details.
|
||||
* @param maxWait ms
|
||||
* @since 0.9.11
|
||||
@@ -411,7 +411,7 @@ public interface I2PSession {
|
||||
public Destination lookupDest(String name, long maxWait) throws I2PSessionException;
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. See above for details.
|
||||
* Same as lookupDest() but with a failure code in the return value
|
||||
*
|
||||
|
||||
@@ -1707,7 +1707,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. Waits a max of 10 seconds by default.
|
||||
*
|
||||
* This only makes sense for a b32 hostname, OR outside router context.
|
||||
@@ -1729,7 +1729,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. See above for details.
|
||||
* @param maxWait ms
|
||||
* @since 0.9.11
|
||||
@@ -1745,7 +1745,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. See above for details.
|
||||
* Same as lookupDest() but with a failure code in the return value
|
||||
*
|
||||
@@ -1767,7 +1767,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. See above for details.
|
||||
* @param maxWait ms
|
||||
* @since 0.9.11
|
||||
|
||||
@@ -300,7 +300,7 @@ class SubSession extends I2PSessionMuxedImpl {
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. Waits a max of 10 seconds by default.
|
||||
*
|
||||
* This only makes sense for a b32 hostname, OR outside router context.
|
||||
@@ -321,7 +321,7 @@ class SubSession extends I2PSessionMuxedImpl {
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the router to lookup a Destination by host name.
|
||||
* Ask the router to lookup a Destination by hostname.
|
||||
* Blocking. See above for details.
|
||||
* @param maxWait ms
|
||||
* @return null on failure
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.i2p.data.Destination;
|
||||
* A naming service based on multiple "hosts.txt" files.
|
||||
* Supports .b32.i2p and {b64} lookups.
|
||||
* Supports caching.
|
||||
* All host names are converted to lower case.
|
||||
* All hostnames are converted to lower case.
|
||||
*/
|
||||
public class HostsTxtNamingService extends MetaNamingService {
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ public abstract class NamingService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up a host name.
|
||||
* @return the Destination for this host name, or
|
||||
* Look up a hostname.
|
||||
* @return the Destination for this hostname, or
|
||||
* <code>null</code> if name is unknown.
|
||||
*/
|
||||
public Destination lookup(String hostname) {
|
||||
@@ -68,7 +68,7 @@ public abstract class NamingService {
|
||||
* This implementation returns reverseLookup(dest, null).
|
||||
*
|
||||
* @param dest non-null
|
||||
* @return a host name for this Destination, or <code>null</code>
|
||||
* @return a hostname for this Destination, or <code>null</code>
|
||||
* if none is known. It is safe for subclasses to always return
|
||||
* <code>null</code> if no reverse lookup is possible.
|
||||
*/
|
||||
@@ -82,14 +82,14 @@ public abstract class NamingService {
|
||||
* Subclasses implementing reverse lookups should override.
|
||||
*
|
||||
* @param h non-null
|
||||
* @return a host name for this hash, or <code>null</code>
|
||||
* @return a hostname for this hash, or <code>null</code>
|
||||
* if none is known. It is safe for subclasses to always return
|
||||
* <code>null</code> if no reverse lookup is possible.
|
||||
*/
|
||||
public String reverseLookup(Hash h) { return null; }
|
||||
|
||||
/**
|
||||
* If the host name is a valid Base64 encoded destination, return the
|
||||
* If the hostname is a valid Base64 encoded destination, return the
|
||||
* decoded Destination. Useful as a "fallback" in custom naming
|
||||
* implementations.
|
||||
* This is misnamed as it isn't a "lookup" at all, but
|
||||
@@ -342,7 +342,7 @@ public abstract class NamingService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return all known host names
|
||||
* @return all known hostnames
|
||||
* or empty Set if none;
|
||||
* Returned Set is not necessarily sorted, implementation dependent
|
||||
* @since 0.8.7
|
||||
@@ -353,7 +353,7 @@ public abstract class NamingService {
|
||||
|
||||
/**
|
||||
* @param options NamingService-specific, can be null
|
||||
* @return all known host names (matching the options if non-null)
|
||||
* @return all known hostnames (matching the options if non-null)
|
||||
* or empty Set if none;
|
||||
* Returned Set is not necessarily sorted, implementation dependent
|
||||
* @since 0.8.7
|
||||
@@ -521,7 +521,7 @@ public abstract class NamingService {
|
||||
*
|
||||
* @param d non-null
|
||||
* @param options NamingService-specific, can be null
|
||||
* @return host name or null
|
||||
* @return hostname or null
|
||||
* @since 0.8.7
|
||||
*/
|
||||
public String reverseLookup(Destination d, Properties options) {
|
||||
@@ -576,7 +576,7 @@ public abstract class NamingService {
|
||||
//// Begin new API for multiple Destinations
|
||||
|
||||
/**
|
||||
* For NamingServices that support multiple Destinations for a single host name,
|
||||
* For NamingServices that support multiple Destinations for a single hostname,
|
||||
* return all of them.
|
||||
*
|
||||
* It is recommended that the returned list is in order of priority, highest-first,
|
||||
@@ -594,7 +594,7 @@ public abstract class NamingService {
|
||||
}
|
||||
|
||||
/**
|
||||
* For NamingServices that support multiple Destinations and Properties for a single host name,
|
||||
* For NamingServices that support multiple Destinations and Properties for a single hostname,
|
||||
* return all of them.
|
||||
*
|
||||
* It is recommended that the returned list is in order of priority, highest-first,
|
||||
@@ -698,7 +698,7 @@ public abstract class NamingService {
|
||||
* Subclasses implementing reverse lookups should override.
|
||||
*
|
||||
* @param h non-null
|
||||
* @return a non-empty list of host names for this hash, or <code>null</code>
|
||||
* @return a non-empty list of hostnames for this hash, or <code>null</code>
|
||||
* if none is known. It is safe for subclasses to always return
|
||||
* <code>null</code> if no reverse lookup is possible.
|
||||
* @since 0.9.26
|
||||
@@ -713,7 +713,7 @@ public abstract class NamingService {
|
||||
* This implementation returns reverseLookupAll(dest, null).
|
||||
*
|
||||
* @param dest non-null
|
||||
* @return a non-empty list of host names for this Destination, or <code>null</code>
|
||||
* @return a non-empty list of hostnames for this Destination, or <code>null</code>
|
||||
* if none is known. It is safe for subclasses to always return
|
||||
* <code>null</code> if no reverse lookup is possible.
|
||||
* @since 0.9.26
|
||||
@@ -729,7 +729,7 @@ public abstract class NamingService {
|
||||
*
|
||||
* @param d non-null
|
||||
* @param options NamingService-specific, can be null
|
||||
* @return a non-empty list of host names for this Destination, or <code>null</code>
|
||||
* @return a non-empty list of hostnames for this Destination, or <code>null</code>
|
||||
* @since 0.9.26
|
||||
*/
|
||||
public List<String> reverseLookupAll(Destination d, Properties options) {
|
||||
|
||||
@@ -509,7 +509,7 @@ public class SingleFileNamingService extends NamingService {
|
||||
|
||||
/**
|
||||
* @param options ignored
|
||||
* @return all known host names, unsorted
|
||||
* @return all known hostnames, unsorted
|
||||
*/
|
||||
public Set<String> getNames(Properties options) {
|
||||
if (!_file.exists())
|
||||
|
||||
@@ -390,8 +390,8 @@ public abstract class Addresses {
|
||||
|
||||
/**
|
||||
* Caching version of InetAddress.getByName(host).getAddress(), which is slow.
|
||||
* Caches numeric host names only.
|
||||
* Will resolve but not cache DNS host names.
|
||||
* Caches numeric hostnames only.
|
||||
* Will resolve but not cache DNS hostnames.
|
||||
*
|
||||
* Unlike InetAddress.getByName(), we do NOT allow numeric IPs
|
||||
* of the form d.d.d, d.d, or d, as these are almost certainly mistakes.
|
||||
@@ -402,7 +402,7 @@ public abstract class Addresses {
|
||||
* InetAddress.getByName() also returns 127.0.0.1 for a host "",
|
||||
* but this is undocumented; as of 0.9.49, here we return null.
|
||||
*
|
||||
* @param host DNS or IPv4 or IPv6 host name; if null or empty returns null
|
||||
* @param host DNS or IPv4 or IPv6 hostname; if null or empty returns null
|
||||
* @return IP or null
|
||||
* @since 0.9.3
|
||||
*/
|
||||
@@ -443,7 +443,7 @@ public abstract class Addresses {
|
||||
/**
|
||||
* Caching version of InetAddress.getByName(host).getAddress(), which is slow.
|
||||
* Resolves literal IP addresses only, will not cause a DNS lookup.
|
||||
* Will return null for host names.
|
||||
* Will return null for hostnames.
|
||||
*
|
||||
* Unlike InetAddress.getByName(), we do NOT allow numeric IPs
|
||||
* of the form d.d.d, d.d, or d, as these are almost certainly mistakes.
|
||||
@@ -476,11 +476,11 @@ public abstract class Addresses {
|
||||
|
||||
/**
|
||||
* For literal IP addresses, this is the same as getIP(String).
|
||||
* For host names, will return the preferred type (IPv4/v6) if available,
|
||||
* For hostnames, will return the preferred type (IPv4/v6) if available,
|
||||
* else the other type if available.
|
||||
* Will resolve but not cache DNS host names.
|
||||
* Will resolve but not cache DNS hostnames.
|
||||
*
|
||||
* @param host DNS or IPv4 or IPv6 host name; if null returns null
|
||||
* @param host DNS or IPv4 or IPv6 hostname; if null returns null
|
||||
* @return IP or null
|
||||
* @since 0.9.28
|
||||
*/
|
||||
@@ -522,9 +522,9 @@ public abstract class Addresses {
|
||||
|
||||
/**
|
||||
* For literal IP addresses, this is the same as getIP(String).
|
||||
* For host names, may return multiple addresses, both IPv4 and IPv6,
|
||||
* For hostnames, may return multiple addresses, both IPv4 and IPv6,
|
||||
* even if those addresses are not reachable due to configuration or available interfaces.
|
||||
* Will resolve but not cache DNS host names.
|
||||
* Will resolve but not cache DNS hostnames.
|
||||
*
|
||||
* Note that order of returned results, and whether
|
||||
* multiple results for either IPv4 or IPv6 or both are actually
|
||||
@@ -533,7 +533,7 @@ public abstract class Addresses {
|
||||
* Number of results may also change based on caching at various layers,
|
||||
* even if the ultimate name server results did not change.
|
||||
*
|
||||
* @param host DNS or IPv4 or IPv6 host name; if null returns null
|
||||
* @param host DNS or IPv4 or IPv6 hostname; if null returns null
|
||||
* @return non-empty list IPs, or null if none
|
||||
* @since 0.9.28
|
||||
*/
|
||||
|
||||
@@ -249,7 +249,7 @@ public class I2PSSLSocketFactory {
|
||||
/**
|
||||
* Returns a socket to the host.
|
||||
*
|
||||
* A host argument that's an IP address (instead of a host name)
|
||||
* A host argument that's an IP address (instead of a hostname)
|
||||
* is not recommended, as this will probably fail
|
||||
* SSL certificate validation.
|
||||
*
|
||||
@@ -267,9 +267,9 @@ public class I2PSSLSocketFactory {
|
||||
/**
|
||||
* Returns a socket to the host.
|
||||
*
|
||||
* An InetAddress argument created with an IP address (instead of a host name)
|
||||
* An InetAddress argument created with an IP address (instead of a hostname)
|
||||
* is not recommended, as this will perform a reverse DNS lookup to
|
||||
* get the host name for certificate validation, which will probably then fail.
|
||||
* get the hostname for certificate validation, which will probably then fail.
|
||||
*
|
||||
* Hostname validation is skipped for localhost addresses, but you still
|
||||
* must trust the certificate.
|
||||
|
||||
Reference in New Issue
Block a user