org.crsh.plugin
Class WebPluginLifeCycle
java.lang.Object
org.crsh.plugin.PluginLifeCycle
org.crsh.plugin.Embedded
org.crsh.plugin.WebPluginLifeCycle
- All Implemented Interfaces:
- EventListener, javax.servlet.ServletContextListener
public class WebPluginLifeCycle
- extends Embedded
- implements javax.servlet.ServletContextListener
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebPluginLifeCycle
public WebPluginLifeCycle()
getPluginContext
public static PluginContext getPluginContext(String contextPath)
throws NullPointerException
- Returns a plugin context associated with the servlet context or null if such context does not exist.
- Parameters:
contextPath - the context path
- Returns:
- the associated plugin context
- Throws:
NullPointerException - if the servlet context argument is null
getMountFactories
protected Map<String,FSMountFactory<?>> getMountFactories()
- This implementation register three file system drivers:
file : the current file system
classpath : the classpath
war : the war content
- Overrides:
getMountFactories in class Embedded
- Returns:
- the drivers
createDiscovery
protected PluginDiscovery createDiscovery(javax.servlet.ServletContext context,
ClassLoader classLoader)
- Create the service loader discovery, this can be subclassed to provide an implementation, the current
implementation returns a
ServiceLoaderDiscovery instance.
- Parameters:
context - the servlet contextclassLoader - the class loader
- Returns:
- the plugin discovery
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
resolveConfMountPointConfig
protected String resolveConfMountPointConfig()
- Overrides:
resolveConfMountPointConfig in class Embedded
- Returns:
- the value returned by
resolvePathProperty(String, String) with the crash.mountpointconfig.conf name
and the getDefaultConfMountPointConfig() default value
resolveCmdMountPointConfig
protected String resolveCmdMountPointConfig()
- Overrides:
resolveCmdMountPointConfig in class Embedded
- Returns:
- the value returned by
resolvePathProperty(String, String) with the crash.mountpointconfig.cmd name
and the getDefaultCmdMountPointConfig() default value
getDefaultCmdMountPointConfig
protected String getDefaultCmdMountPointConfig()
- Returns:
war:/WEB-INF/crash/commands/
getDefaultConfMountPointConfig
protected String getDefaultConfMountPointConfig()
- Returns:
war:/WEB-INF/crash/
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Copyright © 2015 eXo Platform SAS. All Rights Reserved.