mirror of
https://github.com/google/nomulus
synced 2026-07-28 02:52:45 +00:00
Record metrics for WHOIS commands
Note that this does not write out metrics for invocations of the nomulus tool. This requires a slight refactoring of the existing WhoisResponse interface so as to also support returning the number of results found by the WHOIS query. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149461208
This commit is contained in:
@@ -62,9 +62,9 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlainTextOutput(final boolean preferUnicode, String disclaimer) {
|
||||
public WhoisResponseResults getResponse(final boolean preferUnicode, String disclaimer) {
|
||||
Registrar registrar = getRegistrar(domain.getCurrentSponsorClientId());
|
||||
return new DomainEmitter()
|
||||
String plaintext = new DomainEmitter()
|
||||
.emitField(
|
||||
"Domain Name", maybeFormatHostname(domain.getFullyQualifiedDomainName(), preferUnicode))
|
||||
.emitField("Domain ID", domain.getRepoId())
|
||||
@@ -97,6 +97,7 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
||||
.emitAwipMessage()
|
||||
.emitFooter(disclaimer)
|
||||
.toString();
|
||||
return WhoisResponseResults.create(plaintext, 1);
|
||||
}
|
||||
|
||||
/** Returns the contact of the given type, or null if it does not exist. */
|
||||
|
||||
Reference in New Issue
Block a user