Package jetbrains.buildServer
Class PluginAwareSpringAccessor
- java.lang.Object
-
- jetbrains.buildServer.PluginAwareSpringAccessor
-
- All Implemented Interfaces:
EventListener,PluginSpringContextListener,SpringAccessor,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class PluginAwareSpringAccessor extends Object implements SpringAccessor, org.springframework.context.ApplicationContextAware, PluginSpringContextListener
-
-
Constructor Summary
Constructors Constructor Description PluginAwareSpringAccessor()PluginAwareSpringAccessor(PluginManager manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOnClearCacheAction(Runnable runnable)voidcontextCreated(org.springframework.context.ApplicationContext applicationContext, PluginInfo plugin)Called just after plugin context is created, but beforeConfigurableApplicationContext.refresh()is called.voidcontextFailedToLoad(org.springframework.context.ApplicationContext applicationContext, PluginInfo plugin, Throwable loadException)May be called after plugin context is created andConfigurableApplicationContext.refresh()is called if plugin spring context has failed to initialize.voidcontextLoaded(org.springframework.context.ApplicationContext applicationContext, PluginInfo plugin)Called just after plugin context is created andConfigurableApplicationContext.refresh()is called.<T> Collection<T>getSpringBeansOfType(Class<T> extensionClass, boolean autowireCandidatesOnly)Returns spring beans of the specified type.voidregisterBeanFactory(SpringAccessor accessor)voidregisterBeanFactory(SpringAccessor accessor, PluginInfo pluginInfo)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Constructor Detail
-
PluginAwareSpringAccessor
public PluginAwareSpringAccessor(PluginManager manager)
-
PluginAwareSpringAccessor
public PluginAwareSpringAccessor()
-
-
Method Detail
-
registerBeanFactory
public void registerBeanFactory(@NotNull SpringAccessor accessor)
-
registerBeanFactory
public void registerBeanFactory(@NotNull SpringAccessor accessor, @Nullable PluginInfo pluginInfo)
-
getSpringBeansOfType
@NotNull public <T> Collection<T> getSpringBeansOfType(@NotNull Class<T> extensionClass, boolean autowireCandidatesOnly)
Description copied from interface:SpringAccessorReturns spring beans of the specified type.- Specified by:
getSpringBeansOfTypein interfaceSpringAccessor- Type Parameters:
T- see extensionClass- Parameters:
extensionClass- the type of a bean to returnautowireCandidatesOnly- if true then beans marked with autowire-candidate="false" are not returned- Returns:
- see above
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
contextCreated
public void contextCreated(org.springframework.context.ApplicationContext applicationContext, PluginInfo plugin)Description copied from interface:PluginSpringContextListenerCalled just after plugin context is created, but beforeConfigurableApplicationContext.refresh()is called.- Specified by:
contextCreatedin interfacePluginSpringContextListener- Parameters:
applicationContext- plugin's application contextplugin- plugin descriptor
-
contextLoaded
public void contextLoaded(org.springframework.context.ApplicationContext applicationContext, PluginInfo plugin)Description copied from interface:PluginSpringContextListenerCalled just after plugin context is created andConfigurableApplicationContext.refresh()is called. This method called afterPluginSpringContextListener.contextCreated(org.springframework.context.ApplicationContext, jetbrains.buildServer.plugins.bean.PluginInfo)is called. This method may not be called is plugin context initialization exception is thrown.#contextFailedToLoad(org.springframework.context.ApplicationContext,jetbrains.buildServer.plugins.bean.PluginInfo, Exception)will be called than.- Specified by:
contextLoadedin interfacePluginSpringContextListener- Parameters:
applicationContext- plugin's application contextplugin- plugin descriptor
-
contextFailedToLoad
public void contextFailedToLoad(org.springframework.context.ApplicationContext applicationContext, PluginInfo plugin, Throwable loadException)Description copied from interface:PluginSpringContextListenerMay be called after plugin context is created andConfigurableApplicationContext.refresh()is called if plugin spring context has failed to initialize. This method called afterPluginSpringContextListener.contextCreated(org.springframework.context.ApplicationContext, jetbrains.buildServer.plugins.bean.PluginInfo)is called. This method may not be called if plugin context has initialized successufully.PluginSpringContextListener.contextLoaded(org.springframework.context.ApplicationContext, jetbrains.buildServer.plugins.bean.PluginInfo)method will be called than.- Specified by:
contextFailedToLoadin interfacePluginSpringContextListener- Parameters:
applicationContext- plugin's application contextplugin- plugin descriptor
-
addOnClearCacheAction
public void addOnClearCacheAction(Runnable runnable)
-
-