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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleConfiggetModuleConfig()AccessorModuleDNSQueriesgetModuleDNSQueries()AccessorRequiredUserVariable[]getRequiredUserVariables()Modules can have required user variables that must be supplied before the NUM record csn be retrieved.voidhandleIndependentQueryRedirect(java.lang.String redirectTo)Update the independent query for the supplied redirectvoidhandleLookupRedirect(java.lang.String redirect)Update the DNS queries for the supplied lookup redirect.voidhandleManagedQueryRedirect(java.lang.String redirectTo)Update the managed query for the supplied redirectvoidhandlePrepopulatedQueryRedirect(java.lang.String redirectTo)Update the pre-populated query for the supplied redirectintincrementRedirectCount()Count redirects and return the current number of redirects.voidsetModuleConfig(ModuleConfig moduleConfig)AccessorvoidsetModuleDNSQueries(ModuleDNSQueries moduleDNSQueries)AccessorvoidsetRequiredUserVariables(RequiredUserVariable[] requiredUserVariables)Update the required user variables with values obtained from the client.
-
-
-
Method Detail
-
incrementRedirectCount
public int incrementRedirectCount()
Count redirects and return the current number of redirects.- Returns:
- the current number of redirects
-
getModuleConfig
public ModuleConfig getModuleConfig()
Accessor- Returns:
- The ModuleConfig object.
-
setModuleConfig
public void setModuleConfig(ModuleConfig moduleConfig)
Accessor- Parameters:
moduleConfig- The ModuleConfig object.
-
getModuleDNSQueries
public ModuleDNSQueries getModuleDNSQueries()
Accessor- Returns:
- The ModuleDNSQueries object.
-
setModuleDNSQueries
public void setModuleDNSQueries(ModuleDNSQueries moduleDNSQueries)
Accessor- Parameters:
moduleDNSQueries- The ModuleDNSQueries object.
-
getRequiredUserVariables
public RequiredUserVariable[] getRequiredUserVariables()
Modules can have required user variables that must be supplied before the NUM record csn be retrieved.- Specified by:
getRequiredUserVariablesin interfaceNumAPIContext- Returns:
- An array of objects.
-
setRequiredUserVariables
public void setRequiredUserVariables(RequiredUserVariable[] requiredUserVariables) throws NumUserVariablesException
Update the required user variables with values obtained from the client.- Specified by:
setRequiredUserVariablesin interfaceNumAPIContext- Parameters:
requiredUserVariables- The RequiredUserVariable array with the value fields populated.- Throws:
NumUserVariablesException- on error
-
handleIndependentQueryRedirect
public void handleIndependentQueryRedirect(java.lang.String redirectTo) throws NumBadURLException, NumInvalidParameterException, NumInvalidRedirectExceptionUpdate the independent query for the supplied redirect- Parameters:
redirectTo- the supplied redirect- Throws:
NumBadURLException- on errorNumInvalidParameterException- on errorNumInvalidRedirectException- on error
-
handleManagedQueryRedirect
public void handleManagedQueryRedirect(java.lang.String redirectTo) throws NumBadURLException, NumInvalidRedirectException, NumInvalidParameterExceptionUpdate the managed query for the supplied redirect- Parameters:
redirectTo- the supplied redirect- Throws:
NumBadURLException- on errorNumInvalidRedirectException- on errorNumInvalidParameterException- on error
-
handlePrepopulatedQueryRedirect
public void handlePrepopulatedQueryRedirect(java.lang.String redirectTo) throws NumBadURLException, NumInvalidRedirectException, NumInvalidParameterExceptionUpdate the pre-populated query for the supplied redirect- Parameters:
redirectTo- the supplied redirect- Throws:
NumBadURLException- on errorNumInvalidRedirectException- on errorNumInvalidParameterException- on error
-
handleLookupRedirect
public void handleLookupRedirect(java.lang.String redirect) throws NumBadURLException, NumInvalidRedirectException, NumInvalidParameterExceptionUpdate the DNS queries for the supplied lookup redirect.- Parameters:
redirect- the supplied redirect location- Throws:
NumBadURLException- on errorNumInvalidRedirectException- on errorNumInvalidParameterException- on error
-
-