public class ThreadPoolPluginRegisterPostProcessor extends DefaultGlobalThreadPoolPluginManager implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.context.ApplicationContextAware
The extension implementation of GlobalThreadPoolPluginManager and BeanPostProcessor,
used to register ThreadPoolPlugin for the bean initialization stage of the ThreadPoolPluginSupport.
NOTE:
If the ThreadPoolPlugin, ThreadPoolPluginRegistrar, and ThreadPoolPluginSupport is set to lazy load,
The processor will not perceive the bean unless the user actively triggers the initialization of the bean.
| 构造器和说明 |
|---|
ThreadPoolPluginRegisterPostProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
postProcessAfterInitialization(Object bean,
String beanName)
Post process bean, if bean is instance of
ThreadPoolPlugin,
ThreadPoolPluginRegistrar or ThreadPoolPluginSupport,
then take beans as an available component and register to GlobalThreadPoolPluginManager. |
Object |
postProcessBeforeInitialization(Object bean,
String beanName)
Apply this
BeanPostProcessor to the given new bean instance before any bean
initialization callbacks (like InitializingBean's afterPropertiesSet
or a custom init-method). |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Set the ApplicationContext that this object runs in.
|
cancelManagement, disableThreadPoolPlugin, disableThreadPoolPluginRegistrar, doRegister, enableThreadPoolPlugin, enableThreadPoolPluginRegistrar, getAllEnableThreadPoolPluginRegistrar, getAllEnableThreadPoolPlugins, getAllManagedThreadPoolPluginSupports, getManagedThreadPoolPluginSupport, registerThreadPoolPluginSupportclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllPluginsFromManagers, getPluginsFromManagers, getPluginsOfTypeFromManagers, unregisterForAllManagersgetIdpublic Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
Post process bean, if bean is instance of ThreadPoolPlugin,
ThreadPoolPluginRegistrar or ThreadPoolPluginSupport,
then take beans as an available component and register to GlobalThreadPoolPluginManager.
postProcessAfterInitialization 在接口中 org.springframework.beans.factory.config.BeanPostProcessorbean - the new bean instancebeanName - the name of the beannull, no subsequent BeanPostProcessors will be invokedorg.springframework.beans.BeansException - in case of errorsGlobalThreadPoolPluginManager.enableThreadPoolPlugin(cn.hippo4j.core.plugin.ThreadPoolPlugin),
GlobalThreadPoolPluginManager.enableThreadPoolPluginRegistrar(cn.hippo4j.core.plugin.manager.ThreadPoolPluginRegistrar),
GlobalThreadPoolPluginManager.registerThreadPoolPluginSupport(cn.hippo4j.core.plugin.manager.ThreadPoolPluginSupport)public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
Invoked after population of normal bean properties but before an init callback such
as InitializingBean.afterPropertiesSet()
or a custom init-method. Invoked after ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader),
ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher) and
MessageSourceAware, if applicable.
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareapplicationContext - the ApplicationContext object to be used by this objectorg.springframework.context.ApplicationContextException - in case of context initialization errorsorg.springframework.beans.BeansException - if thrown by application context methodsBeanInitializationExceptionpublic Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
BeanPostProcessor to the given new bean instance before any bean
initialization callbacks (like InitializingBean's afterPropertiesSet
or a custom init-method). The bean will already be populated with property values.
The returned bean instance may be a wrapper around the original.
The default implementation returns the given bean as-is.
postProcessBeforeInitialization 在接口中 org.springframework.beans.factory.config.BeanPostProcessorbean - the new bean instancebeanName - the name of the beannull, no subsequent BeanPostProcessors will be invokedorg.springframework.beans.BeansException - in case of errorsInitializingBean.afterPropertiesSet()Copyright © 2023. All rights reserved.