org.crsh.plugin
Class Embedded

java.lang.Object
  extended by org.crsh.plugin.PluginLifeCycle
      extended by org.crsh.plugin.Embedded
Direct Known Subclasses:
SpringBootstrap, WebPluginLifeCycle

public class Embedded
extends PluginLifeCycle

Author:
Julien Viet

Field Summary
 
Fields inherited from class org.crsh.plugin.PluginLifeCycle
log
 
Constructor Summary
Embedded()
           
 
Method Summary
protected  PluginContext create(Map<String,Object> attributes, PluginDiscovery discovery, ClassLoader loader)
          Create the plugin context, allow subclasses to customize it.
protected  FS createCommandFS()
          Create the command file system from the crash.mountpointconfig.cmd servlet context parameter.
protected  FS createConfFS()
          Create the conf file system from the crash.mountpointconfig.conf servlet context parameter.
protected  FS createFS(String mountPointConfig)
          Create a new file system, configured by a the argument mountPointConfig: when the mount point configuration is not null, it is mounted on the returned file system.
protected  Map<String,FSMountFactory<?>> getMountFactories()
           
protected  String resolveCmdMountPointConfig()
           
protected  String resolveConfMountPointConfig()
           
protected  PluginContext start(Map<String,Object> attributes, PluginDiscovery discovery, ClassLoader loader)
          Create and start the plugin context.
 
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
 

Constructor Detail

Embedded

public Embedded()
Method Detail

create

protected PluginContext create(Map<String,Object> attributes,
                               PluginDiscovery discovery,
                               ClassLoader loader)
Create the plugin context, allow subclasses to customize it.

Parameters:
discovery - the plugin discovery
Returns:
the plugin context

start

protected PluginContext start(Map<String,Object> attributes,
                              PluginDiscovery discovery,
                              ClassLoader loader)
Create and start the plugin context.

Parameters:
discovery - the plugin discovery
Returns:
the plugin context

createCommandFS

protected FS createCommandFS()
                      throws IOException
Create the command file system from the crash.mountpointconfig.cmd servlet context parameter.

Returns:
the command file system
Throws:
IOException

createConfFS

protected FS createConfFS()
                   throws IOException
Create the conf file system from the crash.mountpointconfig.conf servlet context parameter.

Returns:
the conf file system
Throws:
IOException

getMountFactories

protected Map<String,FSMountFactory<?>> getMountFactories()
Returns:
the registered drivers, by default an empty map is returned, subclasses can override to customize

createFS

protected FS createFS(String mountPointConfig)
               throws IOException
Create a new file system, configured by a the argument mountPointConfig: when the mount point configuration is not null, it is mounted on the returned file system.

Parameters:
mountPointConfig - the mount point configuration
Returns:
the configured file system
Throws:
IOException - any io exception

resolveConfMountPointConfig

protected String resolveConfMountPointConfig()

resolveCmdMountPointConfig

protected String resolveCmdMountPointConfig()


Copyright © 2015 eXo Platform SAS. All Rights Reserved.