Class ASelfTest

  • All Implemented Interfaces:
    com.netscape.certsrv.selftests.ISelfTest
    Direct Known Subclasses:
    CAPresence, CAValidity, KRAPresence, OCSPPresence, OCSPValidity, SystemCertsVerification

    public abstract class ASelfTest
    extends java.lang.Object
    implements com.netscape.certsrv.selftests.ISelfTest
    This class implements an individual self test.

    Version:
    $Revision$, $Date$
    Author:
    mharmsen, thomask
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected IConfigStore mConfig  
      protected java.lang.String mInstanceName  
      protected java.lang.String mPrefix  
      protected com.netscape.certsrv.selftests.ISelfTestSubsystem mSelfTestSubsystem  
      • Fields inherited from interface com.netscape.certsrv.selftests.ISelfTest

        PROP_PLUGIN
    • Constructor Summary

      Constructors 
      Constructor Description
      ASelfTest()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      IConfigStore getSelfTestConfigStore()
      Returns the root configuration storage (self test parameters) associated with this subsystem.
      abstract 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​(com.netscape.certsrv.selftests.ISelfTestSubsystem subsystem, java.lang.String instanceName, IConfigStore parameters)
      Initializes this subsystem with the configuration store associated with this instance name.
      abstract void runSelfTest​(com.netscape.certsrv.logging.ILogEventListener logger)
      Execute an individual self test.
      abstract void shutdownSelfTest()
      Stops this subsystem.
      abstract 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

      • mSelfTestSubsystem

        protected com.netscape.certsrv.selftests.ISelfTestSubsystem mSelfTestSubsystem
      • mInstanceName

        protected java.lang.String mInstanceName
      • mPrefix

        protected java.lang.String mPrefix
    • Constructor Detail

      • ASelfTest

        public ASelfTest()
    • Method Detail

      • initSelfTest

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

        Specified by:
        initSelfTest in interface com.netscape.certsrv.selftests.ISelfTest
        Parameters:
        subsystem - the associated subsystem
        instanceName - the name of this self test instance
        parameters - configuration store (self test parameters)
        Throws:
        com.netscape.certsrv.selftests.EDuplicateSelfTestException - subsystem has duplicate name/value
        com.netscape.certsrv.selftests.EInvalidSelfTestException - subsystem has invalid name/value
        com.netscape.certsrv.selftests.EMissingSelfTestException - subsystem has missing name/value
      • startupSelfTest

        public abstract void startupSelfTest()
                                      throws com.netscape.certsrv.selftests.ESelfTestException
        Notifies this subsystem if it is in execution mode.

        Specified by:
        startupSelfTest in interface com.netscape.certsrv.selftests.ISelfTest
        Throws:
        com.netscape.certsrv.selftests.ESelfTestException - failed to start
      • shutdownSelfTest

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

        Specified by:
        shutdownSelfTest in interface com.netscape.certsrv.selftests.ISelfTest
      • 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 com.netscape.certsrv.selftests.ISelfTest
        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 com.netscape.certsrv.selftests.ISelfTest
        Returns:
        configuration store (self test parameters) of this subsystem
      • getSelfTestDescription

        public abstract 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 com.netscape.certsrv.selftests.ISelfTest
        Parameters:
        locale - locale of the client that requests the description
        Returns:
        description of self test
      • runSelfTest

        public abstract void runSelfTest​(com.netscape.certsrv.logging.ILogEventListener logger)
                                  throws java.lang.Exception
        Execute an individual self test.

        Specified by:
        runSelfTest in interface com.netscape.certsrv.selftests.ISelfTest
        Parameters:
        logger - specifies logging subsystem
        Throws:
        java.lang.Exception - self test exception