com.netscape.cms.selftests.ca
Class CAPresence

java.lang.Object
  extended by com.netscape.cms.selftests.ASelfTest
      extended by com.netscape.cms.selftests.ca.CAPresence
All Implemented Interfaces:
ISelfTest

public class CAPresence
extends ASelfTest

This class implements a self test to check for CA presence.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $
Author:
mharmsen, thomask

Field Summary
static java.lang.String PROP_CA_SUB_ID
           
 
Fields inherited from class com.netscape.cms.selftests.ASelfTest
mConfig, mInstanceName, mPrefix, mSelfTestSubsystem
 
Fields inherited from interface com.netscape.certsrv.selftests.ISelfTest
PROP_PLUGIN
 
Constructor Summary
CAPresence()
           
 
Method Summary
 IConfigStore getSelfTestConfigStore()
          Returns the root configuration storage (self test parameters) associated with this subsystem.
 java.lang.String getSelfTestDescription(java.util.Locale locale)
          Retrieves description associated with an individual self test.
 java.lang.String getSelfTestName()
          Returns the name associated with this self test.
 void initSelfTest(ISelfTestSubsystem subsystem, java.lang.String instanceName, IConfigStore parameters)
          Initializes this subsystem with the configuration store associated with this instance name.
 void runSelfTest(ILogEventListener logger)
          Execute an individual self test.
 void shutdownSelfTest()
          Stops this subsystem.
 void startupSelfTest()
          Notifies this subsystem if it is in execution mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_CA_SUB_ID

public static final java.lang.String PROP_CA_SUB_ID
See Also:
Constant Field Values
Constructor Detail

CAPresence

public CAPresence()
Method Detail

initSelfTest

public void initSelfTest(ISelfTestSubsystem subsystem,
                         java.lang.String instanceName,
                         IConfigStore parameters)
                  throws EDuplicateSelfTestException,
                         EInvalidSelfTestException,
                         EMissingSelfTestException
Initializes this subsystem with the configuration store associated with this instance name.

Specified by:
initSelfTest in interface ISelfTest
Overrides:
initSelfTest in class ASelfTest
Parameters:
subsystem - the associated subsystem
instanceName - the name of this self test instance
parameters - configuration store (self test parameters)
Throws:
EDuplicateSelfTestException - subsystem has duplicate name/value
EInvalidSelfTestException - subsystem has invalid name/value
EMissingSelfTestException - subsystem has missing name/value

startupSelfTest

public void startupSelfTest()
                     throws ESelfTestException
Notifies this subsystem if it is in execution mode.

Specified by:
startupSelfTest in interface ISelfTest
Specified by:
startupSelfTest in class ASelfTest
Throws:
ESelfTestException - failed to start

shutdownSelfTest

public void shutdownSelfTest()
Stops this subsystem. The subsystem may call shutdownSelfTest anytime after initialization.

Specified by:
shutdownSelfTest in interface ISelfTest
Specified by:
shutdownSelfTest in class ASelfTest

getSelfTestName

public java.lang.String getSelfTestName()
Returns the name associated with this self test. This method may return null if the self test has not been intialized.

Specified by:
getSelfTestName in interface ISelfTest
Overrides:
getSelfTestName in class ASelfTest
Returns:
instanceName of this self test

getSelfTestConfigStore

public IConfigStore getSelfTestConfigStore()
Returns the root configuration storage (self test parameters) associated with this subsystem.

Specified by:
getSelfTestConfigStore in interface ISelfTest
Overrides:
getSelfTestConfigStore in class ASelfTest
Returns:
configuration store (self test parameters) of this subsystem

getSelfTestDescription

public java.lang.String getSelfTestDescription(java.util.Locale locale)
Retrieves description associated with an individual self test. This method may return null.

Specified by:
getSelfTestDescription in interface ISelfTest
Specified by:
getSelfTestDescription in class ASelfTest
Parameters:
locale - locale of the client that requests the description
Returns:
description of self test

runSelfTest

public void runSelfTest(ILogEventListener logger)
                 throws ESelfTestException
Execute an individual self test.

Specified by:
runSelfTest in interface ISelfTest
Specified by:
runSelfTest in class ASelfTest
Parameters:
logger - specifies logging subsystem
Throws:
ESelfTestException - self test exception