public class Bootstrap extends PluginLifeCycle
Modifier and Type | Field and Description |
---|---|
private Map<String,Object> |
attributes
The attributes.
|
private FS |
cmdFS
The command file system.
|
private FS |
confFS
The configuration file system.
|
private ClassLoader |
loader
The base classloader.
|
protected Logger |
log
.
|
Constructor and Description |
---|
Bootstrap(ClassLoader baseLoader)
Create a bootstrap instance with the base classloader and an empty and unmodifiable attribute map.
|
Bootstrap(ClassLoader baseLoader,
FS confFS,
FS cmdFS)
Create a bootstrap instance with the base classloader and an empty and unmodifiable attribute map.
|
Modifier and Type | Method and Description |
---|---|
Bootstrap |
addToCmdPath(File path)
Add a command path directory.
|
Bootstrap |
addToCmdPath(FSDriver<?> driver)
Add a command path driver.
|
Bootstrap |
addToCmdPath(Path path)
Add a command path directory.
|
Bootstrap |
addToConfPath(File path)
Add a configuration path directory.
|
Bootstrap |
addToConfPath(FSDriver<?> driver)
Add a configuration path driver.
|
Bootstrap |
addToConfPath(Path path)
Add a configuration path.
|
void |
bootstrap()
Trigger the boostrap.
|
void |
setAttributes(Map<String,Object> attributes)
Replaces the attributes to use, the new attributes map will be used as is and not copied.
|
void |
shutdown() |
getConfig, getContext, setConfig, start, stop
private final ClassLoader loader
private Map<String,Object> attributes
public Bootstrap(ClassLoader baseLoader, FS confFS, FS cmdFS) throws NullPointerException
baseLoader
- the base classloader crash will useconfFS
- the conf file systemcmdFS
- the cmd file systemNullPointerException
- if any argument is nullpublic Bootstrap(ClassLoader baseLoader) throws NullPointerException
baseLoader
- the base classloader crash will useNullPointerException
- if any argument is nullpublic void setAttributes(Map<String,Object> attributes)
attributes
- the attribute mappublic Bootstrap addToConfPath(FSDriver<?> driver) throws IOException, NullPointerException
driver
- the configuration driverNullPointerException
- when the driver is nullIOException
- any io exceptionpublic Bootstrap addToConfPath(File path) throws NullPointerException, IOException
path
- the configuration pathNullPointerException
- when the path argument is nullIOException
- any io exceptionpublic Bootstrap addToConfPath(Path path) throws NullPointerException, IOException, URISyntaxException
path
- the configuration pathNullPointerException
- when the path argument is nullIOException
- any io exceptionURISyntaxException
- any uri syntax exceptionpublic Bootstrap addToCmdPath(FSDriver<?> driver) throws IOException, NullPointerException
driver
- the command driverNullPointerException
- when the driver is nullIOException
- any io exceptionpublic Bootstrap addToCmdPath(File path) throws NullPointerException, IOException
path
- the command pathNullPointerException
- when the path argument is nullIOException
- any io exceptionpublic Bootstrap addToCmdPath(Path path) throws NullPointerException, IOException, URISyntaxException
path
- the command pathNullPointerException
- when the path argument is nullIOException
- any io exceptionURISyntaxException
- any uri syntax exceptionpublic void bootstrap() throws Exception
Exception
- any exception that would prevent the bootstrappublic void shutdown()
Copyright © 2015 eXo Platform SAS. All Rights Reserved.