Package uk.num.numlib.api
Interface NumAPICallbacks
-
- All Known Implementing Classes:
NumAPICallbacksDefaultHandler
public interface NumAPICallbacksThis interface defines the callback contract for the NumAPI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classNumAPICallbacks.LocationThe type of location the NUM record was received from
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.KeygetKey()The decryption key from the client application.java.lang.StringgetResult()Accessor for the JSON result.booleanisSignedDNSSEC()Check whether the record was DNSSEC signed.NumAPICallbacks.LocationreceivedFrom()The type of location the NUM record was received from.voidsetErrorResult(java.lang.String error)Called if an error occurs while retrieving or processing the NUM recocrd.voidsetKey(java.security.Key key)The decryption key set by the client applicationvoidsetLocation(NumAPICallbacks.Location location)Tell the library user where the record was retrieved from.voidsetResult(java.lang.String json)Called when the result is available from DNSvoidsetSignedDNSSEC(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.
-
-