com.groiss.component
Class ServiceManager

java.lang.Object
  extended by com.groiss.component.ServiceManager

public class ServiceManager
extends java.lang.Object

The main class. It contains the main method, which is called on startup. The following steps are performed:

  • load the configuration file
  • set the system locale
  • add the resource service
  • start the log service


    Constructor Summary
    ServiceManager()
               
     
    Method Summary
    static Service addService(java.lang.String classname, java.lang.String id)
              Add a class to the services, the class is loaded, teh default contructor is called and the startup() method is called.
    static Service getService(java.lang.String id)
              Return the service by id.
    static java.util.Date getStartDate()
              Return the date of startup.
    static boolean isShutdownInProgress()
               
    static boolean isStandalone()
               
    static void main(java.lang.String[] args)
               
    static void main(java.lang.String conffile, boolean logOnConsole)
               
    static void reconfigureAll()
               
    static void shutdown()
              Shutdown the services, the shutdown() methods of the services are called.
    static void shutdown(int status)
              This method is called from HTMLAdmin
    static void shutdown(int status, int delayMS)
               
    static void shutdownService(java.lang.String[] args)
              This method is called as stop method when running as JavaService NT service
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    ServiceManager

    public ServiceManager()
    Method Detail

    main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception
    Throws:
    java.lang.Exception

    main

    public static void main(java.lang.String conffile,
                            boolean logOnConsole)
                     throws java.lang.Exception
    Throws:
    java.lang.Exception

    addService

    public static Service addService(java.lang.String classname,
                                     java.lang.String id)
    Add a class to the services, the class is loaded, teh default contructor is called and the startup() method is called.


    shutdownService

    public static void shutdownService(java.lang.String[] args)
                                throws ApplicationException
    This method is called as stop method when running as JavaService NT service

    Throws:
    ApplicationException

    shutdown

    public static void shutdown(int status)
    This method is called from HTMLAdmin

    Parameters:
    status - 0='Stop server', 2='Restart server'

    shutdown

    public static void shutdown(int status,
                                int delayMS)

    shutdown

    public static void shutdown()
                         throws ApplicationException
    Shutdown the services, the shutdown() methods of the services are called. This is the final shutdown() method, called either from shutdown hook or from service stop method.

    Throws:
    ApplicationException

    getService

    public static Service getService(java.lang.String id)
    Return the service by id.


    getStartDate

    public static java.util.Date getStartDate()
    Return the date of startup.


    reconfigureAll

    public static void reconfigureAll()
                               throws ApplicationException
    Throws:
    ApplicationException

    isStandalone

    public static boolean isStandalone()

    isShutdownInProgress

    public static boolean isShutdownInProgress()


    Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.