public abstract class AbstractMain extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
isServer |
static String |
MAIN_ARG_CONFIG |
static String |
MAIN_ARG_CONNECT |
static String |
MAIN_ARG_LOGFILE |
static String |
MAIN_ARG_LOGLEVEL |
static String |
MAIN_ARG_NONEWLOGSTREAM |
static String |
MAIN_ARG_RESETIOR |
static String |
MAIN_ARG_SKIPBOOTSTRAP |
| Constructor and Description |
|---|
AbstractMain() |
| Modifier and Type | Method and Description |
|---|---|
static Properties |
readC2KArgs(String[] args)
Reading and setting input paramaters
Known arguments :
logLevel: the log level 0-9 (+10 to have time, +20 to have only one level)
logFile: the full path of the target log file.
|
static Properties |
readPropertyFiles(String configPath,
String connectFile,
Properties argProps)
Loads config & connect files into c2kprops, and merges them with existing properties
|
static void |
setShutdownHandler(ShutdownHandler handler)
Register application specific shutdown handler
|
static void |
shutdown(int errCode)
The actual shotdown each subclass should be calling to release resource properly
|
public static boolean isServer
public static final String MAIN_ARG_NONEWLOGSTREAM
public static final String MAIN_ARG_CONFIG
public static final String MAIN_ARG_LOGLEVEL
public static final String MAIN_ARG_LOGFILE
public static final String MAIN_ARG_CONNECT
public static final String MAIN_ARG_RESETIOR
public static final String MAIN_ARG_SKIPBOOTSTRAP
public static Properties readC2KArgs(String[] args) throws BadArgumentsException
args - arguments normally passed by the main()BadArgumentsExceptionpublic static Properties readPropertyFiles(String configPath, String connectFile, Properties argProps) throws BadArgumentsException
configPath - path to the config fileconnectFile - path to the connect (clc) fileargProps - existing propertiesBadArgumentsExceptionpublic static void setShutdownHandler(ShutdownHandler handler)
handler - the ShutdownHandlerpublic static void shutdown(int errCode)
errCode - unix error code to pass to the ShutdownHandlerCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.