Class SelfTestSubsystem
java.lang.Object
com.netscape.certsrv.base.Subsystem
com.netscape.cmscore.selftests.SelfTestSubsystem
This class implements a container for self tests.
- Author:
- mharmsen, thomask
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidderegisterSelfTestAtStartup(String instanceName) Deregister an individual self test on the instances list AND on the "startup" list (note that the specified self test will be removed from each list).voidderegisterSelfTestOnDemand(String instanceName) Deregister an individual self test on the instances list AND on the "on demand" list (note that the specified self test will be removed from each list).voiddisableSelfTestAtStartup(String instanceName) Disable the specified self test at server startup.voiddisableSelfTestOnDemand(String instanceName) Disable the specified self test from being able to be executed on demand.voidenableSelfTestAtStartup(String instanceName, boolean isCritical) Enable the specified self test at server startup.voidenableSelfTestOnDemand(String instanceName, boolean isCritical) Enable the specified self test to be executed on demand.Returns the root configuration storage of this subsystem.getId()This method retrieves the name of this subsystem.getSelfTest(String instanceName) Retrieve an individual self test from the instances list given its instance name.Returns the LogEventListener of this subsystem.////////////////////////////voidinit(ConfigStore config) This method initializes this subsystem.booleanisSelfTestCriticalAtStartup(String instanceName) Determine if failure of the specified self test is fatal to server startup.booleanisSelfTestCriticalOnDemand(String instanceName) Determine if failure of the specified self test is fatal when it is executed on demand.booleanisSelfTestEnabledAtStartup(String instanceName) Determine if the specified self test is executed automatically at server startup.booleanisSelfTestEnabledOnDemand(String instanceName) Determine if the specified self test is enabled to be executed on demand.String[]List the instance names of all the self tests enabled to run at server startup (in execution order); may return null.String[]List the instance names of all the self tests enabled to run on demand (in execution order); may return null.voidvoidlog(LogEventListener logger, String msg) This method represents the log interface for the self test subsystem.voidregisterSelfTestAtStartup(String instanceName, boolean isCritical, SelfTest instance) Register an individual self test on the instances list AND on the "startup" list (note that the specified self test will be appended to the end of each list).voidregisterSelfTestOnDemand(String instanceName, boolean isCritical, SelfTest instance) Register an individual self test on the instances list AND on the "on demand" list (note that the specified self test will be appended to the end of each list).voidrunSelfTest(String instanceName) Execute a self test.voidExecute all self tests specified to be run at server startup.voidExecute all self tests specified to be run on demand.voidThis method sets information specific to this subsystem.voidshutdown()Stops this subsystem.voidstartup()Notifies this subsystem if owner is in running mode.Methods inherited from class Subsystem
getCMSEngine, setCMSEngine
-
Field Details
-
logger
public static org.slf4j.Logger logger -
ID
- See Also:
-
PROP_CONTAINER
- See Also:
-
PROP_INSTANCE
- See Also:
-
PROP_LOGGER
- See Also:
-
PROP_LOGGER_CLASS
- See Also:
-
PROP_ORDER
- See Also:
-
PROP_ON_DEMAND
- See Also:
-
PROP_STARTUP
- See Also:
-
mSelfTestInstances
-
mOnDemandOrder
-
mStartupOrder
-
-
Constructor Details
-
SelfTestSubsystem
public SelfTestSubsystem()
-
-
Method Details
-
getSelfTestNames
//////////////////////////// -
listSelfTestsEnabledOnDemand
List the instance names of all the self tests enabled to run on demand (in execution order); may return null.- Returns:
- list of self test instance names run on demand
-
enableSelfTestOnDemand
public void enableSelfTestOnDemand(String instanceName, boolean isCritical) throws EInvalidSelfTestException, EMissingSelfTestException Enable the specified self test to be executed on demand.- Parameters:
instanceName- instance name of self testisCritical- isCritical is either a critical failure (true) or a non-critical failure (false)- Throws:
EInvalidSelfTestException- subsystem has invalid name/valueEMissingSelfTestException- subsystem has missing name/value
-
disableSelfTestOnDemand
Disable the specified self test from being able to be executed on demand.- Parameters:
instanceName- instance name of self test- Throws:
EMissingSelfTestException- subsystem has missing name
-
isSelfTestEnabledOnDemand
Determine if the specified self test is enabled to be executed on demand.- Parameters:
instanceName- instance name of self test- Returns:
- true if the specified self test is enabled on demand
- Throws:
EMissingSelfTestException- subsystem has missing name
-
isSelfTestCriticalOnDemand
Determine if failure of the specified self test is fatal when it is executed on demand.- Parameters:
instanceName- instance name of self test- Returns:
- true if failure of the specified self test is fatal when it is executed on demand
- Throws:
EMissingSelfTestException- subsystem has missing name
-
runSelfTestsOnDemand
Execute all self tests specified to be run on demand.- Throws:
EMissingSelfTestException- subsystem has missing nameESelfTestException- self test exception
-
runSelfTest
-
listSelfTestsEnabledAtStartup
List the instance names of all the self tests enabled to run at server startup (in execution order); may return null.- Returns:
- list of self test instance names run at server startup
-
enableSelfTestAtStartup
public void enableSelfTestAtStartup(String instanceName, boolean isCritical) throws EInvalidSelfTestException, EMissingSelfTestException Enable the specified self test at server startup.- Parameters:
instanceName- instance name of self testisCritical- isCritical is either a critical failure (true) or a non-critical failure (false)- Throws:
EInvalidSelfTestException- subsystem has invalid name/valueEMissingSelfTestException- subsystem has missing name/value
-
disableSelfTestAtStartup
Disable the specified self test at server startup.- Parameters:
instanceName- instance name of self test- Throws:
EMissingSelfTestException- subsystem has missing name
-
isSelfTestEnabledAtStartup
Determine if the specified self test is executed automatically at server startup.- Parameters:
instanceName- instance name of self test- Returns:
- true if the specified self test is executed at server startup
- Throws:
EMissingSelfTestException- subsystem has missing name
-
isSelfTestCriticalAtStartup
Determine if failure of the specified self test is fatal to server startup.- Parameters:
instanceName- instance name of self test- Returns:
- true if failure of the specified self test is fatal to server startup
- Throws:
EMissingSelfTestException- subsystem has missing name
-
runSelfTestsAtStartup
Execute all self tests specified to be run at server startup.- signed.audit LOGGING_SIGNED_AUDIT_SELFTESTS_EXECUTION used when self tests are run at server startup
- Throws:
EMissingSelfTestException- subsystem has missing nameException- self test exception
-
log
-
getSelfTest
-
getSelfTestLogger
Returns the LogEventListener of this subsystem. This method may return null.- Returns:
- LogEventListener of this subsystem
-
log
This method represents the log interface for the self test subsystem.- Parameters:
logger- log event listenermsg- self test log message
-
registerSelfTestOnDemand
public void registerSelfTestOnDemand(String instanceName, boolean isCritical, SelfTest instance) throws EDuplicateSelfTestException, EInvalidSelfTestException, EMissingSelfTestException Register an individual self test on the instances list AND on the "on demand" list (note that the specified self test will be appended to the end of each list).- Parameters:
instanceName- instance name of self testisCritical- isCritical is either a critical failure (true) or a non-critical failure (false)instance- individual self test- Throws:
EDuplicateSelfTestException- subsystem has duplicate nameEInvalidSelfTestException- subsystem has invalid name/valueEMissingSelfTestException- subsystem has missing name/value
-
deregisterSelfTestOnDemand
Deregister an individual self test on the instances list AND on the "on demand" list (note that the specified self test will be removed from each list).- Parameters:
instanceName- instance name of self test- Throws:
EMissingSelfTestException- subsystem has missing name
-
registerSelfTestAtStartup
public void registerSelfTestAtStartup(String instanceName, boolean isCritical, SelfTest instance) throws EDuplicateSelfTestException, EInvalidSelfTestException, EMissingSelfTestException Register an individual self test on the instances list AND on the "startup" list (note that the specified self test will be appended to the end of each list).- Parameters:
instanceName- instance name of self testisCritical- isCritical is either a critical failure (true) or a non-critical failure (false)instance- individual self test- Throws:
EDuplicateSelfTestException- subsystem has duplicate nameEInvalidSelfTestException- subsystem has invalid name/valueEMissingSelfTestException- subsystem has missing name/value
-
deregisterSelfTestAtStartup
Deregister an individual self test on the instances list AND on the "startup" list (note that the specified self test will be removed from each list).- Parameters:
instanceName- instance name of self test- Throws:
EMissingSelfTestException- subsystem has missing name
-
getId
-
setId
This method sets information specific to this subsystem.- Overrides:
setIdin classSubsystem- Parameters:
id- identification of this subsystem- Throws:
EBaseException- base CMS exception
-
init
This method initializes this subsystem. -
startup
Notifies this subsystem if owner is in running mode.- Overrides:
startupin classSubsystem- Throws:
EBaseException- base CMS exception
-
shutdown
-
getConfigStore
Returns the root configuration storage of this subsystem. This method may return null.- Overrides:
getConfigStorein classSubsystem- Returns:
- configuration store of this subsystem
-