org.apache.webbeans.event
Class NotificationManager
java.lang.Object
org.apache.webbeans.event.NotificationManager
public final class NotificationManager
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTAINER_EVENT_CLASSES
public static final Set<Class> CONTAINER_EVENT_CLASSES
NotificationManager
public NotificationManager(WebBeansContext webBeansContext)
clearCaches
public void clearCaches()
- This methods needs to get called after the container got started.
This is to avoid that events which already got fired during bootstrap in Extensions
will get cached and events from beans thus get ignored.
hasContextLifecycleObserver
public boolean hasContextLifecycleObserver(Annotation lifecycleEvent)
- Parameters:
lifecycleEvent - e.g. DestroyedLiteral.INSTANCE_REQUEST_SCOPED
- Returns:
- whether the given Initialized or Destroyed event has observer methods.
getObserverMethods
public List<javax.enterprise.inject.spi.ObserverMethod<?>> getObserverMethods()
addObserver
public <T> void addObserver(javax.enterprise.inject.spi.ObserverMethod<T> observer,
Type eventType)
addObserver
public <T> void addObserver(javax.enterprise.inject.spi.ObserverMethod<T> observer,
javax.enterprise.util.TypeLiteral<T> typeLiteral)
resolveObservers
public <T> Set<javax.enterprise.inject.spi.ObserverMethod<? super T>> resolveObservers(T event,
EventMetadataImpl metadata,
boolean isLifecycleEvent)
fireEvent
public void fireEvent(Object event,
EventMetadataImpl metadata,
boolean isLifecycleEvent)
getObservableMethodForAnnotatedMethod
public <T> javax.enterprise.inject.spi.ObserverMethod<?> getObservableMethodForAnnotatedMethod(javax.enterprise.inject.spi.AnnotatedMethod<?> annotatedMethod,
javax.enterprise.inject.spi.AnnotatedParameter<?> annotatedParameter,
AbstractOwbBean<T> bean)
- Gets observer method from given annotated method.
- Type Parameters:
T - bean type info- Parameters:
annotatedMethod - annotated method for observerbean - bean instance
- Returns:
- ObserverMethod
isContainerEvent
public boolean isContainerEvent(javax.enterprise.inject.spi.AnnotatedParameter<?> annotatedParameter)
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.