|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.plugin.PluginLifeCycle org.crsh.standalone.Bootstrap
public class Bootstrap
A boostrap for starting a standalone CRaSH.
Field Summary | |
---|---|
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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()
|
Methods inherited from class org.crsh.plugin.PluginLifeCycle |
---|
getConfig, getContext, setConfig, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Logger log
private final FS confFS
private final FS cmdFS
private final ClassLoader loader
private Map<String,Object> attributes
Constructor Detail |
---|
public Bootstrap(ClassLoader baseLoader, FS confFS, FS cmdFS) throws NullPointerException
baseLoader
- the base classloader crash will useconfFS
- the conf file systemcmdFS
- the cmd file system
NullPointerException
- if any argument is nullpublic Bootstrap(ClassLoader baseLoader) throws NullPointerException
baseLoader
- the base classloader crash will use
NullPointerException
- if any argument is nullMethod Detail |
---|
public void setAttributes(Map<String,Object> attributes)
attributes
- the attribute mappublic Bootstrap addToConfPath(FSDriver<?> driver) throws IOException, NullPointerException
driver
- the configuration driver
NullPointerException
- when the driver is null
IOException
- any io exceptionpublic Bootstrap addToConfPath(File path) throws NullPointerException, IOException
path
- the configuration path
NullPointerException
- when the path argument is null
IOException
- any io exceptionpublic Bootstrap addToConfPath(Path path) throws NullPointerException, IOException, URISyntaxException
path
- the configuration path
NullPointerException
- when the path argument is null
IOException
- any io exception
URISyntaxException
- any uri syntax exceptionpublic Bootstrap addToCmdPath(FSDriver<?> driver) throws IOException, NullPointerException
driver
- the command driver
NullPointerException
- when the driver is null
IOException
- any io exceptionpublic Bootstrap addToCmdPath(File path) throws NullPointerException, IOException
path
- the command path
NullPointerException
- when the path argument is null
IOException
- any io exceptionpublic Bootstrap addToCmdPath(Path path) throws NullPointerException, IOException, URISyntaxException
path
- the command path
NullPointerException
- when the path argument is null
IOException
- any io exception
URISyntaxException
- any uri syntax exceptionpublic void bootstrap() throws Exception
Exception
- any exception that would prevent the bootstrappublic void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |