Package google.registry.whois
Class WhoisException
java.lang.Object
java.lang.Throwable
java.lang.Exception
google.registry.whois.WhoisException
- All Implemented Interfaces:
WhoisResponse
,Serializable
Exception that gets thrown when WHOIS command isn't successful.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Exception that wraps WhoisExceptions returned from Retrier.Nested classes/interfaces inherited from interface google.registry.whois.WhoisResponse
WhoisResponse.WhoisResponseResults
-
Method Summary
Modifier and TypeMethodDescriptiongetResponse
(boolean preferUnicode, String disclaimer) Returns the WHOIS response.int
Returns a non-2xx HTTP status code to differentiate types of failure.org.joda.time.DateTime
Returns the time at which this WHOIS request was processed.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getTimestamp
public org.joda.time.DateTime getTimestamp()Returns the time at which this WHOIS request was processed.- Specified by:
getTimestamp
in interfaceWhoisResponse
-
getStatus
public int getStatus()Returns a non-2xx HTTP status code to differentiate types of failure. -
getResponse
Description copied from interface:WhoisResponse
Returns the WHOIS response.- Specified by:
getResponse
in interfaceWhoisResponse
- Parameters:
preferUnicode
- iffalse
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 totrue
.disclaimer
- text to show at bottom of output
-