Class HttpServiceProxyRegistryFactoryBean
- All Implemented Interfaces:
Aware, BeanClassLoaderAware, FactoryBean<HttpServiceProxyRegistry>, InitializingBean, ApplicationContextAware
FactoryBean for HttpServiceProxyRegistry responsible for
initializing HttpServiceGroups and creating the HTTP Service client
proxies for each group.
This class is imported as a bean definition through an
AbstractHttpServiceRegistrar.
- Since:
- 7.0
- Author:
- Rossen Stoyanchev, Phillip Webb, Olga Maciaszek-Sharma
- See Also:
-
Field Summary
Fields inherited from interface FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.Return an instance (possibly shared or independent) of the object managed by this factory.Class<?> Return the type of object that this FactoryBean creates, ornullif not known in advance.voidsetApplicationContext(ApplicationContext applicationContext) Set the ApplicationContext that this object runs in.voidsetBeanClassLoader(ClassLoader beanClassLoader) Callback that supplies the beanclass loaderto a bean instance.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FactoryBean
isSingleton
-
Method Details
-
setApplicationContext
Description copied from interface:ApplicationContextAwareSet the ApplicationContext that this object runs in. Normally this call will be used to initialize the object.Invoked after population of normal bean properties but before an init callback such as
InitializingBean.afterPropertiesSet()or a custom init-method. Invoked afterResourceLoaderAware.setResourceLoader(ResourceLoader),ApplicationEventPublisherAware.setApplicationEventPublisher(ApplicationEventPublisher)andMessageSourceAware, if applicable.- Specified by:
setApplicationContextin interfaceApplicationContextAware- Parameters:
applicationContext- the ApplicationContext object to be used by this object- Throws:
BeansException- if thrown by application context methods- See Also:
-
setBeanClassLoader
Description copied from interface:BeanClassLoaderAwareCallback that supplies the beanclass loaderto a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean'sInitializingBean.afterPropertiesSet()method or a custom init-method.- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware- Parameters:
beanClassLoader- the owning class loader
-
getObjectType
Description copied from interface:FactoryBeanReturn the type of object that this FactoryBean creates, ornullif not known in advance.This allows one to check for specific types of beans without instantiating objects, for example on autowiring.
In the case of implementations that create a singleton object, this method should try to avoid singleton creation as far as possible; it should rather estimate the type in advance. For prototypes, returning a meaningful type here is advisable too.
This method can be called before this FactoryBean has been fully initialized. It must not rely on state created during initialization; of course, it can still use such state if available.
NOTE: Autowiring will simply ignore FactoryBeans that return
nullhere. Therefore, it is highly recommended to implement this method properly, using the current state of the FactoryBean.- Specified by:
getObjectTypein interfaceFactoryBean<HttpServiceProxyRegistry>- Returns:
- the type of object that this FactoryBean creates,
or
nullif not known at the time of the call - See Also:
-
afterPropertiesSet
public void afterPropertiesSet()Description copied from interface:InitializingBeanInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- Specified by:
afterPropertiesSetin interfaceInitializingBean
-
getObject
Description copied from interface:FactoryBeanReturn an instance (possibly shared or independent) of the object managed by this factory.As with a
BeanFactory, this allows support for both the Singleton and Prototype design patterns.If this FactoryBean is not fully initialized yet at the time of the call (for example because it is involved in a circular reference), throw a corresponding
FactoryBeanNotInitializedException.FactoryBeans are allowed to return
nullobjects. The bean factory will consider this as a normal value to be used and will not throw aFactoryBeanNotInitializedExceptionin this case. However, FactoryBean implementations are encouraged to throwFactoryBeanNotInitializedExceptionthemselves, as appropriate.- Specified by:
getObjectin interfaceFactoryBean<HttpServiceProxyRegistry>- Returns:
- an instance of the bean (can be
null) - See Also:
-