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 booleanisEncrypted()Check whether the record needs to be decrypted.booleanisSignedDNSSEC()Check whether the record was DNSSEC signed.NumAPICallbacks.LocationreceivedFrom()The type of location the NUM record was received from.voidsetEncrypted(boolean encrypted)Set a flag to indicate whether the NUM record was encrypted or not.voidsetErrorResult(java.lang.String error)Called if an error occurs while retrieving or processing the NUM recocrd.voidsetLocation(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.voidsetWasEncrypted(boolean wasEncrypted)Tell the library user whether the record retrieved from DNS was encrypted or not.booleanwasEncrypted()Check whether the NUM record was encrypted when received from DNS.
-
-
-
Method Detail
-
setResult
void setResult(java.lang.String json)
Called when the result is available from DNS- Parameters:
json- The JSON String containing the result.
-
setErrorResult
void setErrorResult(java.lang.String error)
Called if an error occurs while retrieving or processing the NUM recocrd.- Parameters:
error- The error String.
-
isEncrypted
boolean isEncrypted()
Check whether the record needs to be decrypted.- Returns:
- true if the record is encrypted
-
setEncrypted
void setEncrypted(boolean encrypted)
Set a flag to indicate whether the NUM record was encrypted or not.- Parameters:
encrypted- true if the NUM record was encrypted
-
wasEncrypted
boolean wasEncrypted()
Check whether the NUM record was encrypted when received from DNS.- Returns:
- true if the record was encrypted.
-
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::MANAGED, Location::POPULATED
-
setWasEncrypted
void setWasEncrypted(boolean wasEncrypted)
Tell the library user whether the record retrieved from DNS was encrypted or not.- Parameters:
wasEncrypted- true if the record retrieved from DNS was encrypted
-
setLocation
void setLocation(NumAPICallbacks.Location location)
Tell the library user where the record was retrieved from.- Parameters:
location- Location::INDEPENDENT, Location::MANAGED, Location::POPULATED
-
-