org.crsh.standalone
Class Bootstrap

java.lang.Object
  extended by org.crsh.plugin.PluginLifeCycle
      extended by org.crsh.standalone.Bootstrap

public class Bootstrap
extends PluginLifeCycle

A boostrap for starting a standalone CRaSH.


Field Summary
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

log

protected final Logger log
.

Constructor Detail

Bootstrap

public Bootstrap(ClassLoader baseLoader,
                 FS confFS,
                 FS cmdFS)
          throws NullPointerException
Create a bootstrap instance with the base classloader and an empty and unmodifiable attribute map.

Parameters:
baseLoader - the base classloader crash will use
confFS - the conf file system
cmdFS - the cmd file system
Throws:
NullPointerException - if any argument is null

Bootstrap

public Bootstrap(ClassLoader baseLoader)
          throws NullPointerException
Create a bootstrap instance with the base classloader and an empty and unmodifiable attribute map.

Parameters:
baseLoader - the base classloader crash will use
Throws:
NullPointerException - if any argument is null
Method Detail

setAttributes

public void setAttributes(Map<String,Object> attributes)
Replaces the attributes to use, the new attributes map will be used as is and not copied.

Parameters:
attributes - the attribute map

addToConfPath

public Bootstrap addToConfPath(FSDriver<?> driver)
                        throws IOException,
                               NullPointerException
Add a configuration path driver.

Parameters:
driver - the configuration driver
Returns:
this bootstrap
Throws:
NullPointerException - when the driver is null
IOException - any io exception

addToConfPath

public Bootstrap addToConfPath(File path)
                        throws NullPointerException,
                               IOException
Add a configuration path directory.

Parameters:
path - the configuration path
Returns:
this bootstrap
Throws:
NullPointerException - when the path argument is null
IOException - any io exception

addToConfPath

public Bootstrap addToConfPath(Path path)
                        throws NullPointerException,
                               IOException,
                               URISyntaxException
Add a configuration path.

Parameters:
path - the configuration path
Returns:
this bootstrap
Throws:
NullPointerException - when the path argument is null
IOException - any io exception
URISyntaxException - any uri syntax exception

addToCmdPath

public Bootstrap addToCmdPath(FSDriver<?> driver)
                       throws IOException,
                              NullPointerException
Add a command path driver.

Parameters:
driver - the command driver
Returns:
this bootstrap
Throws:
NullPointerException - when the driver is null
IOException - any io exception

addToCmdPath

public Bootstrap addToCmdPath(File path)
                       throws NullPointerException,
                              IOException
Add a command path directory.

Parameters:
path - the command path
Returns:
this bootstrap
Throws:
NullPointerException - when the path argument is null
IOException - any io exception

addToCmdPath

public Bootstrap addToCmdPath(Path path)
                       throws NullPointerException,
                              IOException,
                              URISyntaxException
Add a command path directory.

Parameters:
path - the command path
Returns:
this bootstrap
Throws:
NullPointerException - when the path argument is null
IOException - any io exception
URISyntaxException - any uri syntax exception

bootstrap

public void bootstrap()
               throws Exception
Trigger the boostrap.

Throws:
Exception - any exception that would prevent the bootstrap

shutdown

public void shutdown()


Copyright © 2015 eXo Platform SAS. All Rights Reserved.