Class WhoisException

  • All Implemented Interfaces:
    WhoisResponse, java.io.Serializable

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      WhoisResponse.WhoisResponseResults getResponse​(boolean preferUnicode, java.lang.String disclaimer)
      Returns the WHOIS response.
      int getStatus()
      Returns a non-2xx HTTP status code to differentiate types of failure.
      org.joda.time.DateTime getTimestamp()
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • 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,
                                                              java.lang.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