org.jboss.resteasy.plugins.spring

## Class SpringBeanProcessor.ResteasyBeanPostProcessor

- java.lang.Object
- - org.jboss.resteasy.plugins.spring.SpringBeanProcessor.ResteasyBeanPostProcessor

- All Implemented Interfaces:
    org.springframework.beans.factory.config.BeanPostProcessor
  Enclosing class:
    SpringBeanProcessor

      protected class SpringBeanProcessor.ResteasyBeanPostProcessor
      extends Object
      implements org.springframework.beans.factory.config.BeanPostProcessor

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SpringBeanProcessor.ResteasyBeanPostProcessor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PropertyInjector` | `getInjector(Class<?> clazz)`
    `void` | `inject(String beanName, Object bean, PropertyInjector propertyInjector)`
    `Object` | `postProcessAfterInitialization(Object bean, String beanName)` This method is invoked after postProcessBeanFactory.
    `Object` | `postProcessBeforeInitialization(Object bean, String beanName)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SpringBeanProcessor.ResteasyBeanPostProcessor

          protected SpringBeanProcessor.ResteasyBeanPostProcessor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)

  - ### Method Detail

    - #### postProcessBeforeInitialization

          public Object postProcessBeforeInitialization(Object bean,
                                               String beanName)
                                                 throws org.springframework.beans.BeansException

      Specified by:
        `postProcessBeforeInitialization` in interface `org.springframework.beans.factory.config.BeanPostProcessor`
      Throws:
        `org.springframework.beans.BeansException`

    - #### postProcessAfterInitialization

          public Object postProcessAfterInitialization(Object bean,
                                              String beanName)
                                                throws org.springframework.beans.BeansException

      This method is invoked after postProcessBeanFactory.

      this method is invoked when ever a new bean is created. This will perform the following:

      1. RESTEasy injection of singleton @Providers, as well as @Provider registration

      2. either singleton or request/prototype RESTeasy injection... but not registration. The RESTEasy registration happens in the onApplicationEvent() below, which happens at the end of the Spring life-cycle

      Specified by:
        `postProcessAfterInitialization` in interface `org.springframework.beans.factory.config.BeanPostProcessor`
      Throws:
        `org.springframework.beans.BeansException`
      See Also:
        `SpringBeanProcessor.postProcessBeanFactory`

    - #### getInjector

          public PropertyInjector getInjector(Class<?> clazz)

    - #### inject

          public void inject(String beanName,
                    Object bean,
                    PropertyInjector propertyInjector)

Copyright © 2014. All Rights Reserved.