Class CMSEngine

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.ServletContextListener

    public class CMSEngine
    extends java.lang.Object
    implements javax.servlet.ServletContextListener
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • PROP_SIGNED_AUDIT_CERT_NICKNAME

        public static final java.lang.String PROP_SIGNED_AUDIT_CERT_NICKNAME
        See Also:
        Constant Field Values
      • id

        public java.lang.String id
      • name

        public java.lang.String name
      • instanceDir

        public java.lang.String instanceDir
      • subsystemInfos

        public final java.util.Map<java.lang.String,​SubsystemInfo> subsystemInfos
      • subsystems

        public final java.util.Map<java.lang.String,​ISubsystem> subsystems
      • unsecurePort

        public java.lang.String unsecurePort
      • securePort

        public java.lang.String securePort
      • excludedLdapAttrsList

        public java.util.List<java.lang.String> excludedLdapAttrsList
      • excludedLdapAttrs

        public static java.lang.String[] excludedLdapAttrs
    • Constructor Detail

      • CMSEngine

        public CMSEngine​(java.lang.String name)
    • Method Detail

      • loadConfig

        public void loadConfig​(java.lang.String path)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createConfig

        public EngineConfig createConfig​(ConfigStorage storage)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getInstanceDir

        public java.lang.String getInstanceDir()
        Retrieves the instance root path of this server.
      • initDebug

        public void initDebug()
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initStartupNotifiers

        public void initStartupNotifiers()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initPasswordStore

        public void initPasswordStore()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testLDAPConnection

        public int testLDAPConnection​(java.lang.String name,
                                      LdapConnInfo info,
                                      java.lang.String binddn,
                                      java.lang.String pwd)
      • initSecurityProvider

        public void initSecurityProvider()
      • initDatabase

        public void initDatabase()
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initPluginRegistry

        public void initPluginRegistry()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initLogSubsystem

        public void initLogSubsystem()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initJssSubsystem

        public void initJssSubsystem()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initDBSubsystem

        public void initDBSubsystem()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initUGSubsystem

        public void initUGSubsystem()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initOIDLoaderSubsystem

        public void initOIDLoaderSubsystem()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initX500NameSubsystem

        public void initX500NameSubsystem()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initRequestSubsystem

        public void initRequestSubsystem()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initAuthSubsystem

        public void initAuthSubsystem()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initAuthzSubsystem

        public void initAuthzSubsystem()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initJobsScheduler

        public void initJobsScheduler()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • configurePorts

        public void configurePorts()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initSecurityDomain

        public void initSecurityDomain()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • init

        public void init()
                  throws java.lang.Exception
        initialize all static, dynamic and final static subsystems.
        Throws:
        java.lang.Exception - if any error occur in subsystems during initialization.
      • createConfigurator

        public Configurator createConfigurator()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isPreOpMode

        public boolean isPreOpMode()
      • isRunningMode

        public boolean isRunningMode()
      • setCSState

        public void setCSState​(int mode)
      • getCSState

        public int getCSState()
      • getEENonSSLPort

        public java.lang.String getEENonSSLPort()
      • getEESSLPort

        public java.lang.String getEESSLPort()
      • getEEClientAuthSSLPort

        public java.lang.String getEEClientAuthSSLPort()
      • getAgentPort

        public java.lang.String getAgentPort()
      • getAdminPort

        public java.lang.String getAdminPort()
      • getSubsystems

        public java.util.Collection<ISubsystem> getSubsystems()
      • getSubsystem

        public ISubsystem getSubsystem​(java.lang.String name)
      • setSubsystemEnabled

        public void setSubsystemEnabled​(java.lang.String id,
                                        boolean enabled)
      • loadSubsystems

        protected void loadSubsystems()
                               throws java.lang.Exception
        load subsystems
        Throws:
        java.lang.Exception
      • initSubsystem

        public void initSubsystem​(ISubsystem subsystem,
                                  IConfigStore subsystemConfig)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initSubsystems

        public void initSubsystems()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • configureAutoShutdown

        public void configureAutoShutdown()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isExcludedLdapAttrsEnabled

        public boolean isExcludedLdapAttrsEnabled()
      • isExcludedLdapAttr

        public boolean isExcludedLdapAttr​(java.lang.String key)
      • checkForAndAutoShutdown

        public void checkForAndAutoShutdown()
        sign some known data to determine if signing key is botched; if so, proceed to graceful shutdown
      • startupSubsystems

        protected void startupSubsystems()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • start

        public void start()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isInRunningState

        public boolean isInRunningState()
      • getServerCertNickname

        public java.lang.String getServerCertNickname()
      • setServerCertNickname

        public void setServerCertNickname​(java.lang.String tokenName,
                                          java.lang.String nickName)
      • setServerCertNickname

        public void setServerCertNickname​(java.lang.String newName)
      • getSharedTokenClass

        public ISharedToken getSharedTokenClass​(java.lang.String configName)
      • disableRequests

        public void disableRequests()
      • areRequestsDisabled

        public boolean areRequestsDisabled()
      • terminateRequests

        public void terminateRequests()
      • isNT

        public static boolean isNT()
      • shutdownJobsScheduler

        public void shutdownJobsScheduler()
      • shutdownAuthzSubsystem

        public void shutdownAuthzSubsystem()
      • shutdownAuthSubsystem

        public void shutdownAuthSubsystem()
      • shutdownRequestSubsystem

        public void shutdownRequestSubsystem()
      • shutdownX500NameSubsystem

        public void shutdownX500NameSubsystem()
      • shutdownOIDLoaderSubsystem

        public void shutdownOIDLoaderSubsystem()
      • shutdownUGSubsystem

        public void shutdownUGSubsystem()
      • shutdownDBSubsystem

        public void shutdownDBSubsystem()
      • shutdownJSSSubsystem

        public void shutdownJSSSubsystem()
      • shutdownLogSubsystem

        public void shutdownLogSubsystem()
      • shutdownDatabase

        public void shutdownDatabase()
      • shutdownPluginRegistry

        public void shutdownPluginRegistry()
      • shutdown

        public void shutdown()
        Shuts down subsystems in backwards order exceptions are ignored. process exists at end to force exit.
      • forceShutdown

        public void forceShutdown()
        Shuts down subsystems in backwards order exceptions are ignored. process exists at end to force exit. Added extra call to shutdown the web server.
      • autoShutdown

        public void autoShutdown()
      • autoShutdown

        public void autoShutdown​(boolean restart)
      • disableSubsystem

        public void disableSubsystem()
      • shutdownSubsystems

        protected void shutdownSubsystems()
      • getConfigStore

        public IConfigStore getConfigStore()
        returns the main config store
      • getServerXml

        public ServerXml getServerXml()
      • getStartupTime

        public long getStartupTime()
        get time server started up
      • putPasswordCache

        public void putPasswordCache​(java.lang.String tag,
                                     java.lang.String pw)
      • getPID

        public int getPID()
      • setListOfVerifiedCerts

        public void setListOfVerifiedCerts​(int size,
                                           long interval,
                                           long unknownStateInterval)
      • isRevoked

        public boolean isRevoked​(java.security.cert.X509Certificate[] certificates)
      • isReady

        public boolean isReady()
      • sleepOneMinute

        public void sleepOneMinute()
      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener