|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.bootstrap.Bootstrap
public class Bootstrap
Bootstrap application for starting OpenNMS.
| Field Summary | |
|---|---|
protected static String |
BOOT_PROPERTIES_NAME
|
protected static String |
LIBRARY_PROPERTIES_NAME
|
protected static String |
OPENNMS_HOME_PROPERTY
|
protected static String |
RRD_PROPERTIES_NAME
|
| Constructor Summary | |
|---|---|
Bootstrap()
|
|
| Method Summary | |
|---|---|
protected static void |
executeClass(String classToExec,
String classToExecMethod,
String[] classToExecArgs,
boolean appendClasspath)
|
static File |
findOpenNMSHome()
Determine the OpenNMS home directory based on the location of the JAR file containing this code. |
static ClassLoader |
loadClasses(File dir,
boolean recursive)
Create a ClassLoader with the JARs found in dir. |
static void |
loadClasses(File dir,
boolean recursive,
LinkedList<URL> urls)
Add JARs found in dir to the LinkedList urls. |
static ClassLoader |
loadClasses(String dirStr,
boolean recursive,
boolean append)
Create a ClassLoader with the JARs found in dirStr. |
protected static void |
loadDefaultProperties()
|
protected static boolean |
loadDefaultProperties(File opennmsHome)
Load default properties from the specified OpenNMS home into the system properties. |
protected static boolean |
loadProperties(File f)
Copy properties from a property file to the system properties. |
protected static void |
loadProperties(InputStream is)
Copy properties from a property input stream to the system properties. |
static void |
main(String[] args)
Bootloader main method. |
static ClassLoader |
newClassLoader(LinkedList<URL> urls)
Create a ClassLoader with the list of URLs found in urls. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String BOOT_PROPERTIES_NAME
protected static final String RRD_PROPERTIES_NAME
protected static final String LIBRARY_PROPERTIES_NAME
protected static final String OPENNMS_HOME_PROPERTY
| Constructor Detail |
|---|
public Bootstrap()
| Method Detail |
|---|
public static ClassLoader loadClasses(String dirStr,
boolean recursive,
boolean append)
throws MalformedURLException
dirStr - List of directories to search for JARs, separated by
File.pathSeparatorrecursive - Whether to recurse into subdirectories of the directories in
dirStrappend - TODO
ClassLoader object.
MalformedURLException - if any.
public static ClassLoader loadClasses(File dir,
boolean recursive)
throws MalformedURLException
dir - Directory to search for JARsrecursive - Whether to recurse into subdirectories of dir
ClassLoader object.
MalformedURLException - if any.public static ClassLoader newClassLoader(LinkedList<URL> urls)
urls - List of URLs to add to the ClassLoader's search list.
ClassLoader object.
public static void loadClasses(File dir,
boolean recursive,
LinkedList<URL> urls)
throws MalformedURLException
dir - Directory to search for JARsrecursive - Whether to recurse into subdirectories of the directory in
dirurls - LinkedList to append found JARs onto
MalformedURLException - if any.public static File findOpenNMSHome()
protected static void loadProperties(InputStream is)
throws IOException
is - InputStream of the properties file to load.
IOException
protected static boolean loadProperties(File f)
throws IOException
IOException
protected static boolean loadDefaultProperties(File opennmsHome)
throws IOException
opennmsHome - the OpenNMS home directory
IOException
public static void main(String[] args)
throws Exception
findOpenNMSHome to determine the
OpenNMS home directory if the bootstrap.properties file has not yet
been loaded. Sets the opennms.home system property to the path returned
from findOpenNMSHome.loadClasses to create
a new ClassLoader. ${opennms.home}/etc and ${opennms.home/lib} are
passed to loadClasses.
args - Command line arguments
Exception - if any.
protected static void executeClass(String classToExec,
String classToExecMethod,
String[] classToExecArgs,
boolean appendClasspath)
throws MalformedURLException,
ClassNotFoundException,
NoSuchMethodException
MalformedURLException
ClassNotFoundException
NoSuchMethodException
protected static void loadDefaultProperties()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||