public class FrameworkBootstrap extends Object implements LoaderConstants
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_BUNDLES_CP |
protected static String |
DEFAULT_LIBS_CP |
protected Map<String,Object> |
env |
protected boolean |
flushCache |
protected Class<?> |
frameworkLoaderClass |
protected File |
home |
protected MutableClassLoader |
loader |
protected boolean |
scanForNestedJars |
protected long |
startTime |
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 and Description |
---|
FrameworkBootstrap(ClassLoader cl,
File home) |
FrameworkBootstrap(MutableClassLoader loader,
File home) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildBundlesClassPath(String bundlesCp,
List<File> bundleFiles) |
protected List<File> |
buildClassPath()
Fills the classloader with all jars found in the defined classpath.
|
protected void |
buildLibsClassPath(String libsCp) |
static void |
copyFile(File src,
File file) |
static void |
copyToFile(InputStream in,
File file) |
static void |
copyTree(File src,
File dst) |
static void |
deleteAll(File file) |
Map<String,Object> |
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) |
ClassLoader |
getClassLoader() |
File |
getHome() |
MutableClassLoader |
getLoader() |
void |
initialize() |
protected void |
initializeEnvironment() |
String |
installBundle(File f) |
protected File |
newFile(String path) |
protected void |
printStartedMessage() |
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 |
start(MutableClassLoader cl) |
void |
stop(MutableClassLoader cl) |
void |
uninstallBundle(String name) |
protected static final String DEFAULT_BUNDLES_CP
protected static final String DEFAULT_LIBS_CP
protected MutableClassLoader loader
protected Class<?> frameworkLoaderClass
protected long startTime
protected boolean scanForNestedJars
protected boolean flushCache
public FrameworkBootstrap(ClassLoader cl, File home) throws IOException
IOException
public FrameworkBootstrap(MutableClassLoader loader, File home) throws IOException
IOException
public void setHostName(String value)
public void setHostVersion(String value)
public void setDoPreprocessing(boolean doPreprocessing)
public void setDevMode(String devMode)
public void setFlushCache(boolean flushCache)
public void setScanForNestedJars(boolean scanForNestedJars)
public MutableClassLoader getLoader()
public ClassLoader getClassLoader()
public void initialize() throws ReflectiveOperationException, IOException
public void start(MutableClassLoader cl) throws ReflectiveOperationException, IOException, JMException
public void stop(MutableClassLoader cl) throws ReflectiveOperationException, JMException
public String installBundle(File f) throws ReflectiveOperationException
ReflectiveOperationException
public void uninstallBundle(String name) throws ReflectiveOperationException
ReflectiveOperationException
protected void initializeEnvironment() throws IOException
IOException
protected void printStartedMessage()
protected File newFile(String path) throws IOException
IOException
protected List<File> buildClassPath() throws IOException
IOException
protected void buildLibsClassPath(String libsCp) throws IOException
IOException
protected void buildBundlesClassPath(String bundlesCp, List<File> bundleFiles) throws IOException
IOException
protected void extractNestedJars(List<File> bundleFiles, File dir) throws IOException
IOException
protected void extractNestedJars(File file, File tmpDir) throws IOException
IOException
protected void extractNestedJar(JarFile file, ZipEntry entry, File dest) throws IOException
IOException
public static void copyFile(File src, File file) throws IOException
IOException
public static void copyToFile(InputStream in, File file) throws IOException
IOException
public static File findFileStartingWidth(File dir, String prefix)
public static void copyTree(File src, File dst) throws IOException
IOException
Copyright © 2018 Nuxeo. All rights reserved.