Package org.refcodes.daemon
Class AbstractDaemon
- java.lang.Object
-
- org.refcodes.daemon.AbstractDaemon
-
public abstract class AbstractDaemon extends java.lang.Object
The Class AbstractDaemon.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CONFIGURATION_FILE
protected static int
EXIT_CANNOT_LOAD_RUNTIME_PROPERTIES
protected static int
EXIT_CANNOT_OPEN_MANAGEMENT_SERVER
protected static int
EXIT_CANNOT_SAVE_RUNTIME_PROPERTIES
protected static int
EXIT_CODE_ALREADY_STARTED
protected static int
EXIT_CODE_NOT_RUNNING
protected static int
EXIT_CODE_NOT_STARTED
protected static int
EXIT_CODE_OK
-
Constructor Summary
Constructors Constructor Description AbstractDaemon()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static void
doRestart()
Do restart.protected static void
doShutdown()
Do shutdown.protected static void
doShutdown(org.refcodes.daemon.AbstractDaemon.ShutDownMode aShutDowenMode)
Do shutdown.protected static void
doStartup()
Do startup.protected static void
doStartup(java.lang.String aConfigFileName)
Do startup.protected static org.refcodes.configuration.Properties
toConfigurationProperties(java.lang.String aConfigFileName)
To configuration properties.protected static java.io.File
toRuntimePropertiesFile()
To runtime properties file.
-
-
-
Field Detail
-
CONFIGURATION_FILE
protected static final java.lang.String CONFIGURATION_FILE
- See Also:
- Constant Field Values
-
EXIT_CODE_OK
protected static final int EXIT_CODE_OK
- See Also:
- Constant Field Values
-
EXIT_CODE_ALREADY_STARTED
protected static final int EXIT_CODE_ALREADY_STARTED
- See Also:
- Constant Field Values
-
EXIT_CODE_NOT_RUNNING
protected static final int EXIT_CODE_NOT_RUNNING
- See Also:
- Constant Field Values
-
EXIT_CANNOT_OPEN_MANAGEMENT_SERVER
protected static final int EXIT_CANNOT_OPEN_MANAGEMENT_SERVER
- See Also:
- Constant Field Values
-
EXIT_CANNOT_SAVE_RUNTIME_PROPERTIES
protected static final int EXIT_CANNOT_SAVE_RUNTIME_PROPERTIES
- See Also:
- Constant Field Values
-
EXIT_CANNOT_LOAD_RUNTIME_PROPERTIES
protected static final int EXIT_CANNOT_LOAD_RUNTIME_PROPERTIES
- See Also:
- Constant Field Values
-
EXIT_CODE_NOT_STARTED
protected static final int EXIT_CODE_NOT_STARTED
- See Also:
- Constant Field Values
-
-
Method Detail
-
doRestart
protected static void doRestart()
Do restart.
-
doStartup
protected static void doStartup()
Do startup.
-
doStartup
protected static void doStartup(java.lang.String aConfigFileName)
Do startup.- Parameters:
aConfigFileName
- the config file name
-
doShutdown
protected static void doShutdown()
Do shutdown.
-
doShutdown
protected static void doShutdown(org.refcodes.daemon.AbstractDaemon.ShutDownMode aShutDowenMode)
Do shutdown.- Parameters:
aShutDowenMode
- the shut dowen mode
-
toRuntimePropertiesFile
protected static java.io.File toRuntimePropertiesFile()
To runtime properties file.- Returns:
- the file
-
toConfigurationProperties
protected static org.refcodes.configuration.Properties toConfigurationProperties(java.lang.String aConfigFileName) throws java.io.IOException, java.text.ParseException
To configuration properties.- Parameters:
aConfigFileName
- the config file name- Returns:
- the properties
- Throws:
java.io.IOException
- thrown in case accessing or processing the properties file failed.java.text.ParseException
- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
-