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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected booleanprotected Class<?> protected Fileprotected MutableClassLoaderprotected booleanprotected longFields 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
ConstructorsConstructorDescriptionFrameworkBootstrap(ClassLoader cl, File home) FrameworkBootstrap(MutableClassLoader loader, File home) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildBundlesClassPath(String bundlesCp, List<File> bundleFiles) Fills the classloader with all jars found in the defined classpath.protected voidbuildLibsClassPath(String libsCp) protected static voidcheckZipSlip(File parent, File child) static voidstatic voidcopyToFile(InputStream in, File file) static voidstatic voidenv()protected voidextractNestedJar(JarFile file, ZipEntry entry, File dest) protected voidextractNestedJars(File file, File tmpDir) protected voidextractNestedJars(List<File> bundleFiles, File dir) static FilefindFileStartingWidth(File dir, String prefix) getHome()protected static FilegetZipEntryAsFile(File parent, String childPath) voidprotected voidprotected Fileprotected voidvoidsetDevMode(String devMode) voidsetDoPreprocessing(boolean doPreprocessing) voidsetFlushCache(boolean flushCache) voidsetHostName(String value) voidsetHostVersion(String value) voidsetScanForNestedJars(boolean scanForNestedJars) voidvoidvoiduninstallBundle(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
-