Class WhoisException

java.lang.Object
java.lang.Throwable
java.lang.Exception
google.registry.whois.WhoisException
All Implemented Interfaces:
WhoisResponse, Serializable

public final class WhoisException extends Exception implements WhoisResponse
Exception that gets thrown when WHOIS command isn't successful.
See Also:
  • Method Details

    • getTimestamp

      public org.joda.time.DateTime getTimestamp()
      Returns the time at which this WHOIS request was processed.
      Specified by:
      getTimestamp in interface WhoisResponse
    • getStatus

      public int getStatus()
      Returns a non-2xx HTTP status code to differentiate types of failure.
    • getResponse

      public WhoisResponse.WhoisResponseResults getResponse(boolean preferUnicode, String disclaimer)
      Description copied from interface: WhoisResponse
      Returns the WHOIS response.
      Specified by:
      getResponse in interface WhoisResponse
      Parameters:
      preferUnicode - if false will cause the output to be converted to ASCII whenever possible; for example, converting IDN hostname labels to punycode. However certain things (like a domain registrant name with accent marks) will be returned "as is". If the WHOIS client has told us they're able to receive UTF-8 (such as with HTTP) then this field should be set to true.
      disclaimer - text to show at bottom of output