Modifier and Type | Field and Description |
---|---|
static int |
ARGUMENT_FAIL |
static int |
CONFIG_FAIL |
static int |
SETUP_FAIL |
Constructor and Description |
---|
MessageVortex() |
Modifier and Type | Method and Description |
---|---|
Integer |
call() |
static Object |
getConfiguredClass(String section,
String name,
Class templateClass)
Loads a class of the given type.
|
static RunningDaemon |
getDaemon(String section,
String classname,
net.messagevortex.MessageVortex.DaemonType type)
This is a wrapper of the getConfiguredClass() methode.
|
static void |
main(String[] args)
Main command line method.
|
static int |
mainReturn(String[] args)
Wrapper function as entry point for tests.
|
public static final int CONFIG_FAIL
public static final int SETUP_FAIL
public static final int ARGUMENT_FAIL
public static void main(String[] args)
Main command line method.
args
- command line parameterspublic static int mainReturn(String[] args)
Wrapper function as entry point for tests.
args
- command line argumentspublic static RunningDaemon getDaemon(String section, String classname, net.messagevortex.MessageVortex.DaemonType type) throws ClassNotFoundException
This is a wrapper of the getConfiguredClass() methode.
It modifies the return type to a RunningDaemon.
section
- the name of the section where the config should be taken fromclassname
- the name of the class to be instantiatedtype
- the type of daemon to be checkedClassNotFoundException
- if classname not foundpublic static Object getConfiguredClass(String section, String name, Class templateClass) throws ClassNotFoundException
Loads a class of the given type.
The class must have the same or a subtype of the template class and must provide a String constructor, taking the name of the config section.
section
- the configuration section where the class was mentioned
(for information purposes in output and to load subsequent data)name
- the Name of the classtemplateClass
- a template class. The loaded class must be the same or a subtyppe of
the template classClassNotFoundException
- if the named class cannot be foundCopyright © 2023. All rights reserved.