Class HttpServiceProxyRegistryFactoryBean

java.lang.Object
org.springframework.web.service.registry.HttpServiceProxyRegistryFactoryBean
All Implemented Interfaces:
Aware, BeanClassLoaderAware, FactoryBean<HttpServiceProxyRegistry>, InitializingBean, ApplicationContextAware

public final class HttpServiceProxyRegistryFactoryBean extends Object implements ApplicationContextAware, BeanClassLoaderAware, InitializingBean, FactoryBean<HttpServiceProxyRegistry>
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:
  • Method Details

    • setApplicationContext

      public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
      Description copied from interface: ApplicationContextAware
      Set 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 after ResourceLoaderAware.setResourceLoader(ResourceLoader), ApplicationEventPublisherAware.setApplicationEventPublisher(ApplicationEventPublisher) and MessageSourceAware, if applicable.

      Specified by:
      setApplicationContext in interface ApplicationContextAware
      Parameters:
      applicationContext - the ApplicationContext object to be used by this object
      Throws:
      BeansException - if thrown by application context methods
      See Also:
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader beanClassLoader)
      Description copied from interface: BeanClassLoaderAware
      Callback that supplies the bean class loader to a bean instance.

      Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean's InitializingBean.afterPropertiesSet() method or a custom init-method.

      Specified by:
      setBeanClassLoader in interface BeanClassLoaderAware
      Parameters:
      beanClassLoader - the owning class loader
    • getObjectType

      public Class<?> getObjectType()
      Description copied from interface: FactoryBean
      Return the type of object that this FactoryBean creates, or null if 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 null here. Therefore, it is highly recommended to implement this method properly, using the current state of the FactoryBean.

      Specified by:
      getObjectType in interface FactoryBean<HttpServiceProxyRegistry>
      Returns:
      the type of object that this FactoryBean creates, or null if not known at the time of the call
      See Also:
    • afterPropertiesSet

      public void afterPropertiesSet()
      Description copied from interface: InitializingBean
      Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

      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:
      afterPropertiesSet in interface InitializingBean
    • getObject

      public HttpServiceProxyRegistry getObject()
      Description copied from interface: FactoryBean
      Return 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 null objects. The bean factory will consider this as a normal value to be used and will not throw a FactoryBeanNotInitializedException in this case. However, FactoryBean implementations are encouraged to throw FactoryBeanNotInitializedException themselves, as appropriate.

      Specified by:
      getObject in interface FactoryBean<HttpServiceProxyRegistry>
      Returns:
      an instance of the bean (can be null)
      See Also: