Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlevs.spring.support
Interface BeanPostProcessorService

public interface BeanPostProcessorService

BeanPostProcessor service that allows bundles to contribute to the programming model of WLEvS. This avoids runtime and build-time dependencies between providers and the programming model. The API differs from regular BeanPostProcessors in that it is stateless with all the required state information passed in.

Method Summary
`void` | `afterPropertiesSet(BundleContext context)` Initialization callback for this context
`void` | `destroy(BundleContext context)` Destruction callback for this context
`java.lang.Object` | `postProcessAfterInitialization(BundleContext context, ConfigurableListableBeanFactory factory, java.lang.Object bean, java.lang.String beanName)` Apply this BeanPostProcessor to the given new bean instance after any bean initialization callbacks (like InitializingBean's `afterPropertiesSet` or a custom init-method).
`void` | `postProcessBeforeDestruction(BundleContext context, ConfigurableListableBeanFactory factory, java.lang.Object bean, java.lang.String beanName)` Apply this BeanPostProcessor to the given bean instance before its destruction.
`java.lang.Object` | `postProcessBeforeInitialization(BundleContext context, ConfigurableListableBeanFactory factory, java.lang.Object bean, java.lang.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).

Method Detail

### postProcessBeforeInitialization

    public java.lang.Object postProcessBeforeInitialization(BundleContext context,
                                                            ConfigurableListableBeanFactory factory,
                                                            java.lang.Object bean,
                                                            java.lang.String beanName)
                                                     throws BeansException

  Apply this 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.

  Parameters:
    `context` - bundle
    `factory` - the bean factory used by the application context
    `bean` - the new bean instance
    `beanName` - the name of the bean
  Returns:
    the bean instance to use, either the original or a wrapped one
  Throws:
    org.springframework.beans.BeansException - in case of errors
  See Also:
    `org.springframework.beans.factory.InitializingBean#afterPropertiesSet`

### postProcessAfterInitialization

    public java.lang.Object postProcessAfterInitialization(BundleContext context,
                                                           ConfigurableListableBeanFactory factory,
                                                           java.lang.Object bean,
                                                           java.lang.String beanName)
                                                    throws BeansException

  Apply this BeanPostProcessor to the given new bean instance after 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.

  In case of a FactoryBean, this callback will be invoked for both the FactoryBean instance and the objects created by the FactoryBean (as of Spring 2.0). The post-processor can decide whether to apply to either the FactoryBean or created objects or both through corresponding `bean instanceof FactoryBean` checks.

  This callback will also be invoked after a short-circuiting triggered by a `org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor#postProcessBeforeInstantiation` method, in contrast to all other BeanPostProcessor callbacks.

  Parameters:
    `context` - bundle
    `factory` - the bean factory used by the application context
    `bean` - the new bean instance
    `beanName` - the name of the bean
  Returns:
    the bean instance to use, either the original or a wrapped one
  Throws:
    org.springframework.beans.BeansException - in case of errors
  See Also:
    `org.springframework.beans.factory.InitializingBean#afterPropertiesSet`, `org.springframework.beans.factory.FactoryBean`

### postProcessBeforeDestruction

    public void postProcessBeforeDestruction(BundleContext context,
                                             ConfigurableListableBeanFactory factory,
                                             java.lang.Object bean,
                                             java.lang.String beanName)
                                      throws BeansException

  Apply this BeanPostProcessor to the given bean instance before its destruction. Can invoke custom destruction callbacks.

  Like DisposableBean's `destroy` and a custom destroy method, this callback just applies to singleton beans in the factory (including inner beans).

  Parameters:
    `context` - bundle
    `factory` - the bean factory used by the application context
    `bean` - the bean instance to be destroyed
    `beanName` - the name of the bean
  Throws:
    org.springframework.beans.BeansException - in case of errors
  See Also:
    `org.springframework.beans.factory.DisposableBean`, `org.springframework.beans.factory.support.AbstractBeanDefinition#setDestroyMethodName`

### afterPropertiesSet

    public void afterPropertiesSet(BundleContext context)
                            throws java.lang.Exception

  Initialization callback for this context

  Parameters:
    `context` -
  Throws:
    java.lang.Exception -

### destroy

    public void destroy(BundleContext context)
                 throws java.lang.Exception

  Destruction callback for this context

  Parameters:
    `context` -
  Throws:
    java.lang.Exception -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 BEA Systems All Rights Reserved.