Package org.cristalise.kernel.process
Class AbstractMain
java.lang.Object
org.cristalise.kernel.process.AbstractMain
- Direct Known Subclasses:
StandardClient,StandardServer
Abstract base class for all CristalSpecific applications
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiesreadC2KArgs(String[] args) 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 featurestatic PropertiesreadPropertyFiles(String configFile, String connectFile, Properties argProps) Loads config invalid input: '&' connect files into c2kprops, and merges them with existing propertiesstatic voidsetShutdownHandler(ShutdownHandler handler) Register application specific shutdown handlerstatic voidshutdown(int errCode) The actual shotdown each subclass should be calling to release resource properly
-
Field Details
-
isServer
public static boolean isServer -
MAIN_ARG_CONFIG
- See Also:
-
MAIN_ARG_CONNECT
- See Also:
-
MAIN_ARG_SKIPBOOTSTRAP
- See Also:
-
-
Constructor Details
-
AbstractMain
public AbstractMain()
-
-
Method Details
-
readC2KArgs
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 fileconnectFile- path to the connect (clc) fileargProps- existing properties- Returns:
- fully initialized and merged list of properties
- Throws:
BadArgumentsException
-
setShutdownHandler
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
-