|
||||||||||
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. |
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) throws NullPointerException
baseLoader
- the base classloader crash will useNullPointerException
- if the loader argument is nullMethod Detail |
---|
public void setAttributes(Map<String,Object> attributes)
attributes
- the attribute mappublic Bootstrap addToConfPath(FSDriver<?> driver) throws NullPointerException
driver
- the configuration driverNullPointerException
- when the driver is nullpublic 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 NullPointerException
driver
- the command driverNullPointerException
- when the driver is nullpublic 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |