Package uk.num.numlib.internal.ctx
Class NumAPIContextBase
java.lang.Object
uk.num.numlib.internal.ctx.NumAPIContextBase
- All Implemented Interfaces:
NumAPIContext
public class NumAPIContextBase extends java.lang.Object implements NumAPIContext
A base class implementation of NumAPIContext.
-
Constructor Summary
Constructors Constructor Description NumAPIContextBase() -
Method Summary
Modifier and Type Method Description java.lang.StringgetRecordLocation()Get the query location based on the current location that is being tried.UserVariable[]getRequiredUserVariables()Get the user variables.voidhandleQueryRedirect(java.lang.String redirect)Update the relevant query for the supplied redirectvoidsetRequiredUserVariables(UserVariable[] uv)Update the required user variables with values obtained from the client.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.num.numlib.api.NumAPIContext
getLocation, isDnsSecSigned, isPopulatorQueryRequired, setLocation, setPopulatorQueryRequired
-
Constructor Details
-
NumAPIContextBase
public NumAPIContextBase()
-
-
Method Details
-
getRecordLocation
public java.lang.String getRecordLocation()Get the query location based on the current location that is being tried.- Returns:
- a DNS query string for the current location.
-
handleQueryRedirect
public void handleQueryRedirect(java.lang.String redirect) throws NumMaximumRedirectsExceededException, uk.num.numlib.exc.NumInvalidDNSQueryException, NumInvalidRedirectExceptionUpdate the relevant query for the supplied redirect- Parameters:
redirect- the supplied redirect- Throws:
NumMaximumRedirectsExceededException- on Erroruk.num.numlib.exc.NumInvalidDNSQueryException- on ErrorNumInvalidRedirectException- on Error
-
getRequiredUserVariables
Get the user variables.- Specified by:
getRequiredUserVariablesin interfaceNumAPIContext- Returns:
- UserVariable[]
-
setRequiredUserVariables
Update the required user variables with values obtained from the client.- Specified by:
setRequiredUserVariablesin interfaceNumAPIContext- Parameters:
uv- The RequiredUserVariable array with the value fields populated.
-