public abstract class AbstractTestServer extends Object implements de.iip_ecosphere.platform.support.Server
| Constructor and Description |
|---|
AbstractTestServer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
extractConfiguration(ClassLoader loader,
String location,
String dfltConfigDir)
Extracts a server configuration from a resource.
|
static void |
extractConfiguration(String location,
String dfltConfigDir)
Extracts a server configuration from a resource from the actual class loader.
|
static File |
getConfigDir(File deflt)
Returns the server configuration directory.
|
static File |
getConfigDir(String deflt)
Returns the server configuration directory.
|
static int |
getInteger(String[] args,
int dflt)
Returns the integer number from the first argument in (command line) {code args}.
|
static int |
getInteger(String[] args,
int argIndex,
int dflt)
Returns the integer number given in (command line) {code args} at
argIndex. |
static boolean |
runsFromJar()
Returns whether this class is/we ware running from a JAR file.
|
static File |
setConfigDir(File directory)
Defines the server configuration directory.
|
private static File configDir
public static final File setConfigDir(File directory)
directory - the directory (may be null, leads to the given default value in
getConfigDir(File))Directorypublic static File getConfigDir(String deflt)
deflt - the default value if setConfigDir(File) was not called beforepublic static File getConfigDir(File deflt)
deflt - the default value if setConfigDir(File) was not called beforepublic static void extractConfiguration(String location, String dfltConfigDir) throws IOException
location - the location within the resourcedfltConfigDir - the default configuration dir for getConfigDir(String)IOException - if something I/O related failspublic static void extractConfiguration(ClassLoader loader, String location, String dfltConfigDir) throws IOException
loader - the class loader holding the resourcelocation - the location within the resourcedfltConfigDir - the default configuration dir for getConfigDir(String)IOException - if something I/O related failspublic static boolean runsFromJar()
true for execution from JAR, falsepublic static int getInteger(String[] args, int dflt)
args - the argumentsdflt - the default value if no argument is availablegetInteger(String[], int, int)public static int getInteger(String[] args, int argIndex, int dflt)
argIndex.args - the argumentsargIndex - the 0-based argument index to read fromdflt - the default value if no argument is availableCopyright © 2022. All rights reserved.