public class MXSystemOSGiFrameworkLauncher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
MXSystemOSGiFrameworkLauncher.ChildFirstURLClassLoader
The ChildFirstURLClassLoader alters regular ClassLoader delegation and will check the URLs
used in its initialization for matching classes before delegating to it's parent.
|
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
FILE_SCHEME |
protected static java.lang.String |
FRAMEWORK_BUNDLE_NAME |
protected static java.lang.String |
LAUNCH_INI |
protected static java.lang.String |
NULL_IDENTIFIER |
protected static java.lang.String |
OSGI_CONFIGURATION_AREA |
protected static java.lang.String |
OSGI_FRAMEWORK |
protected static java.lang.String |
OSGI_INSTALL_AREA |
protected static java.lang.String |
OSGI_INSTANCE_AREA |
protected static java.lang.String |
STARTER |
Constructor and Description |
---|
MXSystemOSGiFrameworkLauncher() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
buildCommandLineArguments() |
protected java.util.Map |
buildInitialPropertyMap()
buildInitialPropertyMap create the inital set of properties from the contents of launch.ini
and for a few other properties necessary to launch defaults are supplied if not provided.
|
protected static boolean |
deleteDirectory(java.io.File directory)
deleteDirectory is a cocnvenience method to recursively delete a directory
|
void |
deploy()
Deploy the OSGi framework libraries into a location suitable for execution.
|
void |
destroy() |
protected int |
findMax(java.lang.String[] candidates) |
java.lang.ClassLoader |
getFrameworkClassLoader()
Returns the classloader used for loading the OSGi framework.
|
java.lang.ClassLoader |
getFrameworkContextClassLoader()
Returns the OSGi framework context classloader.
|
java.util.Properties |
getFrameworkInternalProperties(java.lang.ClassLoader cl) |
protected java.io.File |
getPlatformDirectory()
Returns the Platfom Directory is where the OSGi software is installed
|
void |
init() |
protected java.util.Properties |
loadProperties(java.lang.String resource)
Load properties from the specified resource
|
protected java.lang.String |
searchFor(java.lang.String target,
java.lang.String start)
Searches for the given target directory starting in the "plugins" subdirectory
of the given location.
|
void |
start()
Start OSGi framework
Read launcher.ini to create a set of initial properties and
use the "commandline" configuration parameter to create the
equivalent command line arguments available when starting Eclipse.
|
void |
stop()
Shutdown the OSGi framework and make it avialable for garbage collection.
|
void |
undeploy()
Undeploy the OSGi framework libraries from the execution location.
|
protected static final java.lang.String FILE_SCHEME
protected static final java.lang.String FRAMEWORK_BUNDLE_NAME
protected static final java.lang.String STARTER
protected static final java.lang.String NULL_IDENTIFIER
protected static final java.lang.String OSGI_FRAMEWORK
protected static final java.lang.String OSGI_INSTANCE_AREA
protected static final java.lang.String OSGI_CONFIGURATION_AREA
protected static final java.lang.String OSGI_INSTALL_AREA
protected static final java.lang.String LAUNCH_INI
public void init()
public void destroy()
public void deploy()
public void undeploy()
public void start()
public java.util.Properties getFrameworkInternalProperties(java.lang.ClassLoader cl)
protected java.util.Map buildInitialPropertyMap()
protected java.lang.String[] buildCommandLineArguments()
public void stop()
protected static boolean deleteDirectory(java.io.File directory)
directory
- - the directory to delete.public java.lang.ClassLoader getFrameworkContextClassLoader()
public java.lang.ClassLoader getFrameworkClassLoader()
protected java.io.File getPlatformDirectory()
protected java.util.Properties loadProperties(java.lang.String resource)
resource
- - The properties file nameprotected java.lang.String searchFor(java.lang.String target, java.lang.String start)
target
- start
- the location to begin searchingprotected int findMax(java.lang.String[] candidates)