Package org.nuxeo.osgi.application
Class FrameworkBootstrap
java.lang.Object
org.nuxeo.osgi.application.FrameworkBootstrap
- All Implemented Interfaces:
LoaderConstants
- Direct Known Subclasses:
DevFrameworkBootstrap
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected boolean
protected Class<?>
protected File
protected MutableClassLoader
protected boolean
protected long
Fields inherited from interface org.nuxeo.osgi.application.LoaderConstants
ARGS, BUNDLES, CONFIG_DIR, DATA_DIR, DEVMODE, FLUSH_CACHE, HOME_DIR, HOST_NAME, HOST_VERSION, INSTALL_RELOAD_TIMER, LIBS, LOG_DIR, PREPROCESSING, SCAN_FOR_NESTED_JARS, TMP_DIR, WEB_DIR
-
Constructor Summary
ConstructorDescriptionFrameworkBootstrap
(ClassLoader cl, File home) FrameworkBootstrap
(MutableClassLoader loader, File home) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buildBundlesClassPath
(String bundlesCp, List<File> bundleFiles) Fills the classloader with all jars found in the defined classpath.protected void
buildLibsClassPath
(String libsCp) protected static void
checkZipSlip
(File parent, File child) static void
static void
copyToFile
(InputStream in, File file) static void
static void
env()
protected void
extractNestedJar
(JarFile file, ZipEntry entry, File dest) protected void
extractNestedJars
(File file, File tmpDir) protected void
extractNestedJars
(List<File> bundleFiles, File dir) static File
findFileStartingWidth
(File dir, String prefix) getHome()
protected static File
getZipEntryAsFile
(File parent, String childPath) void
protected void
protected File
protected void
void
setDevMode
(String devMode) void
setDoPreprocessing
(boolean doPreprocessing) void
setFlushCache
(boolean flushCache) void
setHostName
(String value) void
setHostVersion
(String value) void
setScanForNestedJars
(boolean scanForNestedJars) void
void
void
uninstallBundle
(String name)
-
Field Details
-
DEFAULT_BUNDLES_CP
- See Also:
-
DEFAULT_LIBS_CP
- See Also:
-
home
-
loader
-
env
-
frameworkLoaderClass
-
startTime
protected long startTime -
scanForNestedJars
protected boolean scanForNestedJars -
flushCache
protected boolean flushCache
-
-
Constructor Details
-
FrameworkBootstrap
- Throws:
IOException
-
FrameworkBootstrap
- Throws:
IOException
-
-
Method Details
-
setHostName
-
setHostVersion
-
setDoPreprocessing
public void setDoPreprocessing(boolean doPreprocessing) -
setDevMode
-
setFlushCache
public void setFlushCache(boolean flushCache) -
setScanForNestedJars
public void setScanForNestedJars(boolean scanForNestedJars) -
env
-
getLoader
-
getClassLoader
-
getHome
-
initialize
-
start
public void start(MutableClassLoader cl) throws ReflectiveOperationException, IOException, JMException -
stop
-
installBundle
- Throws:
ReflectiveOperationException
-
uninstallBundle
- Throws:
ReflectiveOperationException
-
initializeEnvironment
- Throws:
IOException
-
printStartedMessage
protected void printStartedMessage() -
newFile
- Throws:
IOException
-
buildClassPath
Fills the classloader with all jars found in the defined classpath.- Returns:
- the list of bundle files.
- Throws:
IOException
-
buildLibsClassPath
- Throws:
IOException
-
buildBundlesClassPath
- Throws:
IOException
-
extractNestedJars
- Throws:
IOException
-
extractNestedJars
- Throws:
IOException
-
extractNestedJar
- Throws:
IOException
-
deleteAll
-
copyFile
- Throws:
IOException
-
copyToFile
- Throws:
IOException
-
findFileStartingWidth
-
copyTree
- Throws:
IOException
-
getZipEntryAsFile
-
checkZipSlip
-