Package uk.num.numlib.api
Class NumAPICallbacksDefaultHandler
- java.lang.Object
-
- uk.num.numlib.api.NumAPICallbacksDefaultHandler
-
- All Implemented Interfaces:
NumAPICallbacks
public class NumAPICallbacksDefaultHandler extends java.lang.Object implements NumAPICallbacks
A default no-op implementation of the NumAPICallbacks.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface uk.num.numlib.api.NumAPICallbacks
NumAPICallbacks.Location
-
-
Constructor Summary
Constructors Constructor Description NumAPICallbacksDefaultHandler()Default constructor
-
Method Summary
All Methods Instance Methods Concrete 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
-
setWasEncrypted
public void setWasEncrypted(boolean wasEncrypted)
Tell the library user whether the record retrieved from DNS was encrypted or not.- Specified by:
setWasEncryptedin interfaceNumAPICallbacks- 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:
setLocationin interfaceNumAPICallbacks- 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:
setResultin interfaceNumAPICallbacks- 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:
setErrorResultin interfaceNumAPICallbacks- Parameters:
error- The error String.
-
isEncrypted
public boolean isEncrypted()
Check whether the record needs to be decrypted.- Specified by:
isEncryptedin interfaceNumAPICallbacks- 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:
setEncryptedin interfaceNumAPICallbacks- 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:
wasEncryptedin interfaceNumAPICallbacks- Returns:
- true if the record was encrypted.
-
isSignedDNSSEC
public boolean isSignedDNSSEC()
Check whether the record was DNSSEC signed.- Specified by:
isSignedDNSSECin interfaceNumAPICallbacks- 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:
setSignedDNSSECin interfaceNumAPICallbacks- Parameters:
signedDNSSEC- true if the record was DNSSEC signed
-
receivedFrom
public NumAPICallbacks.Location receivedFrom()
The type of location the NUM record was received from.- Specified by:
receivedFromin interfaceNumAPICallbacks- Returns:
- Location::INDEPENDENT, Location::MANAGED, Location::POPULATED
-
-