Class NumAPICallbacksDefaultHandler

  • All Implemented Interfaces:
    NumAPICallbacks

    public class NumAPICallbacksDefaultHandler
    extends java.lang.Object
    implements NumAPICallbacks
    A default no-op implementation of the NumAPICallbacks.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEncrypted()
      Check whether the record needs to be decrypted.
      boolean isSignedDNSSEC()
      Check whether the record was DNSSEC signed.
      NumAPICallbacks.Location receivedFrom()
      The type of location the NUM record was received from.
      void setEncrypted​(boolean encrypted)
      Set a flag to indicate whether the NUM record was encrypted or not.
      void setErrorResult​(java.lang.String error)
      Called if an error occurs while retrieving or processing the NUM recocrd.
      void setLocation​(NumAPICallbacks.Location location)
      Tell the library user where the record was retrieved from.
      void setResult​(java.lang.String json)
      Called when the result is available from DNS
      void setSignedDNSSEC​(boolean signedDNSSEC)
      Set a flag to indicate whether the record was DNSSEC signed or not.
      void setWasEncrypted​(boolean wasEncrypted)
      Tell the library user whether the record retrieved from DNS was encrypted or not.
      boolean wasEncrypted()
      Check whether the NUM record was encrypted when received from DNS.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NumAPICallbacksDefaultHandler

        public NumAPICallbacksDefaultHandler()
        Default constructor
    • Method Detail

      • setWasEncrypted

        public void setWasEncrypted​(boolean wasEncrypted)
        Tell the library user whether the record retrieved from DNS was encrypted or not.
        Specified by:
        setWasEncrypted in interface NumAPICallbacks
        Parameters:
        wasEncrypted - true if the record retrieved from DNS was encrypted
      • setLocation

        public void setLocation​(NumAPICallbacks.Location location)
        Tell the library user where the record was retrieved from.
        Specified by:
        setLocation in interface NumAPICallbacks
        Parameters:
        location - Location::INDEPENDENT, Location::MANAGED, Location::POPULATED
      • setResult

        public void setResult​(java.lang.String json)
        Called when the result is available from DNS
        Specified by:
        setResult in interface NumAPICallbacks
        Parameters:
        json - The JSON String containing the result.
      • setErrorResult

        public void setErrorResult​(java.lang.String error)
        Called if an error occurs while retrieving or processing the NUM recocrd.
        Specified by:
        setErrorResult in interface NumAPICallbacks
        Parameters:
        error - The error String.
      • isEncrypted

        public boolean isEncrypted()
        Check whether the record needs to be decrypted.
        Specified by:
        isEncrypted in interface NumAPICallbacks
        Returns:
        true if the record is encrypted
      • setEncrypted

        public void setEncrypted​(boolean encrypted)
        Set a flag to indicate whether the NUM record was encrypted or not.
        Specified by:
        setEncrypted in interface NumAPICallbacks
        Parameters:
        encrypted - true if the NUM record was encrypted
      • wasEncrypted

        public boolean wasEncrypted()
        Check whether the NUM record was encrypted when received from DNS.
        Specified by:
        wasEncrypted in interface NumAPICallbacks
        Returns:
        true if the record was encrypted.
      • isSignedDNSSEC

        public boolean isSignedDNSSEC()
        Check whether the record was DNSSEC signed.
        Specified by:
        isSignedDNSSEC in interface NumAPICallbacks
        Returns:
        true if the record was DNSSEC signed.
      • setSignedDNSSEC

        public void setSignedDNSSEC​(boolean signedDNSSEC)
        Set a flag to indicate whether the record was DNSSEC signed or not.
        Specified by:
        setSignedDNSSEC in interface NumAPICallbacks
        Parameters:
        signedDNSSEC - true if the record was DNSSEC signed