Remove TLD parameters from WHOIS command factory methods

The small efficiency increase in not having to look up the TLDs again
did not justify making the externally extensible API more complicated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145465971
This commit is contained in:
mcilwain 2017-01-24 14:12:34 -08:00 committed by Ben McIlwain
parent 6c11ac5392
commit 579e4cb74e
5 changed files with 13 additions and 49 deletions

View file

@ -17,7 +17,6 @@ package google.registry.whois;
import com.google.common.net.InternetDomainName;
import google.registry.config.RegistryConfig.ConfigModule;
import java.net.InetAddress;
import javax.annotation.Nullable;
/**
* A class used to configure WHOIS commands.
@ -28,17 +27,8 @@ import javax.annotation.Nullable;
public class WhoisCommandFactory {
/** Returns a new {@link WhoisCommand} to perform a domain lookup on the specified domain name. */
public final WhoisCommand domainLookup(InternetDomainName domainName) {
return domainLookup(domainName, null);
}
/**
* Returns a new {@link WhoisCommand} to perform a domain lookup on the specified domain name in
* the specified TLD.
*/
public WhoisCommand domainLookup(
InternetDomainName domainName, @Nullable InternetDomainName tld) {
return new DomainLookupCommand(domainName, tld);
public WhoisCommand domainLookup(InternetDomainName domainName) {
return new DomainLookupCommand(domainName);
}
/**
@ -51,17 +41,8 @@ public class WhoisCommandFactory {
/**
* Returns a new {@link WhoisCommand} to perform a nameserver lookup on the specified host name.
*/
public final WhoisCommand nameserverLookupByHost(InternetDomainName hostName) {
return nameserverLookupByHost(hostName, null);
}
/**
* Returns a new {@link WhoisCommand} to perform a nameserver lookup on the specified host name in
* the specified TLD.
*/
public WhoisCommand nameserverLookupByHost(
InternetDomainName hostName, @Nullable InternetDomainName tld) {
return new NameserverLookupByHostCommand(hostName, tld);
public WhoisCommand nameserverLookupByHost(InternetDomainName hostName) {
return new NameserverLookupByHostCommand(hostName);
}
/**