Class AbstractMain

java.lang.Object
org.cristalise.kernel.process.AbstractMain
Direct Known Subclasses:
StandardClient, StandardServer

public abstract class AbstractMain extends Object
Abstract base class for all CristalSpecific applications
  • Field Details

  • Constructor Details

    • AbstractMain

      public AbstractMain()
  • Method Details

    • readC2KArgs

      public static Properties readC2KArgs(String[] args) throws BadArgumentsException
      Reading and setting input paramaters Known arguments :
      • config
      • specifies the connect file
      • connect
      • specifies the clc file
      • LocalCentre
      • sets the local centre id
      • resetIOR
      • simple argument with no value to trigger the reset ior feature
      Parameters:
      args - arguments normally passed by the main()
      Returns:
      the initialised Properties
      Throws:
      BadArgumentsException
    • readPropertyFiles

      public static Properties readPropertyFiles(String configFile, String connectFile, Properties argProps) throws BadArgumentsException
      Loads config invalid input: '&' connect files into c2kprops, and merges them with existing properties
      Parameters:
      configFile - path to the config file
      connectFile - path to the connect (clc) file
      argProps - existing properties
      Returns:
      fully initialized and merged list of properties
      Throws:
      BadArgumentsException
    • setShutdownHandler

      public static void setShutdownHandler(ShutdownHandler handler)
      Register application specific shutdown handler
      Parameters:
      handler - the ShutdownHandler
    • shutdown

      public static void shutdown(int errCode)
      The actual shotdown each subclass should be calling to release resource properly
      Parameters:
      errCode - unix error code to pass to the ShutdownHandler