| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AfterBeanDiscovery
 The event type of the second event fired by the container when it has fully
 completed the bean discovery process, validated that there are no definition
 errors relating to the discovered beans, and registered
 Bean and
 ObserverMethod objects for the discovered
 beans, but before detecting deployment problems.
 
A portable extension may take advantage of this event to register beans, interceptors, decorators, observer methods and custom context objects with the container.
     void afterBeanDiscovery(@Observes AfterBeanDiscovery event, BeanManager manager) { ... }
 
 
 If any observer method of the AfterBeanDiscovery event throws an
 exception, the exception is treated as a definition error by the container.
 
| Method Summary | |
|---|---|
|  void | addBean(Bean<?> bean)Fires an event of type ProcessBeancontaining the givenBeanand then
 registers theBeanwith the container,
 thereby making it available for injection into other beans. | 
|  void | addContext(Context context)Registers a custom Contextobject
 with the container. | 
|  void | addDefinitionError(java.lang.Throwable t)Registers a definition error with the container, causing the container to abort deployment after all observers have been notified. | 
|  void | addObserverMethod(ObserverMethod<?> observerMethod)Fires an event of type ProcessObserverMethodcontaining the
 givenObserverMethodand then
 registers theObserverMethodwith the
 container, thereby making it available for event notifications. | 
| Method Detail | 
|---|
void addDefinitionError(java.lang.Throwable t)
t - The definition error as a Throwablevoid addBean(Bean<?> bean)
ProcessBean
 containing the given Bean and then
 registers the Bean with the container,
 thereby making it available for injection into other beans. The given
 Bean may implement
 Interceptor or
 Decorator.
bean - The bean to add to the deploymentvoid addObserverMethod(ObserverMethod<?> observerMethod)
ProcessObserverMethod containing the
 given ObserverMethod and then
 registers the ObserverMethod with the
 container, thereby making it available for event notifications.
observerMethod - The custom observer method to add to the deploymentvoid addContext(Context context)
Context object
 with the container.
context - The custom context to add to the deployment| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||