Package com.google.gerrit.server.plugins
Class ServerPlugin
- java.lang.Object
-
- com.google.gerrit.server.plugins.Plugin
-
- com.google.gerrit.server.plugins.ServerPlugin
-
- Direct Known Subclasses:
TestServerPlugin
public class ServerPlugin extends Plugin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gerrit.server.plugins.Plugin
Plugin.ApiType, Plugin.CacheKey
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<? extends com.google.inject.Module>batchModuleprotected Class<? extends com.google.inject.Module>httpModuleprotected Class<? extends com.google.inject.Module>sshModuleprotected Class<? extends com.google.inject.Module>sysModule
-
Constructor Summary
Constructors Constructor Description ServerPlugin(String name, String pluginCanonicalWebUrl, PluginUser pluginUser, Path srcJar, org.eclipse.jgit.internal.storage.file.FileSnapshot snapshot, PluginContentScanner scanner, Path dataDir, ClassLoader classLoader, String metricsPrefix, GerritRuntime gerritRuntime)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(RegistrationHandle handle)protected booleancanReload()StringgetApiVersion()PluginContentScannergetContentScanner()com.google.inject.InjectorgetHttpInjector()com.google.inject.InjectorgetSshInjector()com.google.inject.InjectorgetSysInjector()StringgetVersion()protected static Class<? extends com.google.inject.Module>load(String name, ClassLoader pluginLoader)protected voidstart(PluginGuiceEnvironment env)protected voidstop(PluginGuiceEnvironment env)-
Methods inherited from class com.google.gerrit.server.plugins.Plugin
getApiType, getCacheKey, getCleanupHandle, getName, getSrcFile, isDisabled, setCleanupHandle, toString
-
-
-
-
Field Detail
-
sysModule
protected Class<? extends com.google.inject.Module> sysModule
-
batchModule
protected Class<? extends com.google.inject.Module> batchModule
-
sshModule
protected Class<? extends com.google.inject.Module> sshModule
-
httpModule
protected Class<? extends com.google.inject.Module> httpModule
-
-
Constructor Detail
-
ServerPlugin
public ServerPlugin(String name, String pluginCanonicalWebUrl, PluginUser pluginUser, Path srcJar, org.eclipse.jgit.internal.storage.file.FileSnapshot snapshot, PluginContentScanner scanner, Path dataDir, ClassLoader classLoader, String metricsPrefix, GerritRuntime gerritRuntime) throws InvalidPluginException
- Throws:
InvalidPluginException
-
-
Method Detail
-
load
protected static Class<? extends com.google.inject.Module> load(String name, ClassLoader pluginLoader) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
getVersion
public String getVersion()
- Specified by:
getVersionin classPlugin
-
getApiVersion
public String getApiVersion()
- Overrides:
getApiVersionin classPlugin
-
start
protected void start(PluginGuiceEnvironment env) throws Exception
-
stop
protected void stop(PluginGuiceEnvironment env)
-
getSysInjector
public com.google.inject.Injector getSysInjector()
- Specified by:
getSysInjectorin classPlugin
-
getSshInjector
public com.google.inject.Injector getSshInjector()
- Specified by:
getSshInjectorin classPlugin
-
getHttpInjector
public com.google.inject.Injector getHttpInjector()
- Specified by:
getHttpInjectorin classPlugin
-
add
public void add(RegistrationHandle handle)
-
getContentScanner
public PluginContentScanner getContentScanner()
- Specified by:
getContentScannerin classPlugin
-
-