mirror of
https://github.com/google/nomulus
synced 2026-09-08 09:07:11 +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:
@@ -43,9 +43,9 @@ class RegistrarWhoisResponse extends WhoisResponseImpl {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlainTextOutput(boolean preferUnicode, String disclaimer) {
|
||||
public WhoisResponseResults getResponse(boolean preferUnicode, String disclaimer) {
|
||||
Set<RegistrarContact> contacts = registrar.getContacts();
|
||||
return new RegistrarEmitter()
|
||||
String plaintext = new RegistrarEmitter()
|
||||
.emitField("Registrar Name", registrar.getRegistrarName())
|
||||
.emitAddress(
|
||||
null,
|
||||
@@ -62,6 +62,7 @@ class RegistrarWhoisResponse extends WhoisResponseImpl {
|
||||
.emitLastUpdated(getTimestamp())
|
||||
.emitFooter(disclaimer)
|
||||
.toString();
|
||||
return WhoisResponseResults.create(plaintext, 1);
|
||||
}
|
||||
|
||||
/** An emitter with logic for registrars. */
|
||||
|
||||
Reference in New Issue
Block a user