Interface NumAPICallbacks

  • All Known Implementing Classes:
    NumAPICallbacksDefaultHandler

    public interface NumAPICallbacks
    This interface defines the callback contract for the NumAPI.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  NumAPICallbacks.Location
      The type of location the NUM record was received from
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.security.Key getKey()
      The decryption key from the client application.
      java.lang.String getResult()
      Accessor for the JSON result.
      boolean isSignedDNSSEC()
      Check whether the record was DNSSEC signed.
      NumAPICallbacks.Location receivedFrom()
      The type of location the NUM record was received from.
      void setErrorResult​(java.lang.String error)
      Called if an error occurs while retrieving or processing the NUM recocrd.
      void setKey​(java.security.Key key)
      The decryption key set by the client application
      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.
    • Method Detail

      • setErrorResult

        void setErrorResult​(java.lang.String error)
        Called if an error occurs while retrieving or processing the NUM recocrd.
        Parameters:
        error - The error String.
      • isSignedDNSSEC

        boolean isSignedDNSSEC()
        Check whether the record was DNSSEC signed.
        Returns:
        true if the record was DNSSEC signed.
      • setSignedDNSSEC

        void setSignedDNSSEC​(boolean signedDNSSEC)
        Set a flag to indicate whether the record was DNSSEC signed or not.
        Parameters:
        signedDNSSEC - true if the record was DNSSEC signed
      • receivedFrom

        NumAPICallbacks.Location receivedFrom()
        The type of location the NUM record was received from.
        Returns:
        Location::INDEPENDENT, Location::HOSTED, Location::POPULATED
      • setLocation

        void setLocation​(NumAPICallbacks.Location location)
        Tell the library user where the record was retrieved from.
        Parameters:
        location - Location::INDEPENDENT, Location::HOSTED, Location::POPULATED
      • getKey

        java.security.Key getKey()
        The decryption key from the client application.
        Returns:
        a Key
      • setKey

        void setKey​(java.security.Key key)
        The decryption key set by the client application
        Parameters:
        key - a Key that matches the algorithm returned by the getAlgorithm() method.
      • getResult

        java.lang.String getResult()
        Accessor for the JSON result.
        Returns:
        the JSON result
      • setResult

        void setResult​(java.lang.String json)
        Called when the result is available from DNS
        Parameters:
        json - The JSON String containing the result.