@Module public class EventManager extends java.lang.Object
Constructor and Description |
---|
EventManager(InjectManager cdiManager) |
Modifier and Type | Method and Description |
---|---|
void |
addExtensionObserver(ObserverMethod<?> observer,
BaseType eventBaseType,
java.lang.annotation.Annotation... bindings)
Registers an event observer
|
<X,Z> void |
addObserver(Bean<X> bean,
AnnotatedMethod<Z> beanMethod) |
void |
addObserver(ObserverMethod<?> observer)
Registers an event observer
|
void |
addObserver(ObserverMethod<?> observer,
BaseType eventBaseType,
java.lang.annotation.Annotation... bindings)
Registers an event observer
|
void |
addObserver(ObserverMethod<?> observer,
java.lang.reflect.Type type,
java.lang.annotation.Annotation... bindings)
Registers an event observer
|
void |
fillObserverMethodList(java.util.Set<ObserverMethod<?>> list,
BaseType type,
java.lang.annotation.Annotation[] qualifiers) |
static <Z> int |
findObserverAnnotation(AnnotatedMethod<Z> method) |
void |
fireEvent(java.lang.Object event,
java.lang.annotation.Annotation... qualifiers) |
void |
fireExtensionEvent(java.lang.Object event,
java.lang.annotation.Annotation... qualifiers) |
void |
fireExtensionEvent(java.lang.Object event,
BaseType eventType,
java.lang.annotation.Annotation... qualifiers) |
void |
removeObserver(ObserverMethod<?> observer)
Removes an event observer
|
<T> java.util.Set<ObserverMethod<? super T>> |
resolveObserverMethods(T event,
java.lang.annotation.Annotation... qualifiers) |
java.lang.String |
toString()
Registers an event observer
|
public EventManager(InjectManager cdiManager)
public <X,Z> void addObserver(Bean<X> bean, AnnotatedMethod<Z> beanMethod)
public static <Z> int findObserverAnnotation(AnnotatedMethod<Z> method)
public void fireEvent(java.lang.Object event, java.lang.annotation.Annotation... qualifiers)
public <T> java.util.Set<ObserverMethod<? super T>> resolveObserverMethods(T event, java.lang.annotation.Annotation... qualifiers)
public void fillObserverMethodList(java.util.Set<ObserverMethod<?>> list, BaseType type, java.lang.annotation.Annotation[] qualifiers)
public void fireExtensionEvent(java.lang.Object event, java.lang.annotation.Annotation... qualifiers)
@Module public void fireExtensionEvent(java.lang.Object event, BaseType eventType, java.lang.annotation.Annotation... qualifiers)
public void addObserver(ObserverMethod<?> observer)
observer
- the observer objectbindings
- the binding set for the eventpublic void addObserver(ObserverMethod<?> observer, java.lang.reflect.Type type, java.lang.annotation.Annotation... bindings)
observer
- the observer objectbindings
- the binding set for the eventpublic void addObserver(ObserverMethod<?> observer, BaseType eventBaseType, java.lang.annotation.Annotation... bindings)
observer
- the observer objectbindings
- the binding set for the eventpublic void addExtensionObserver(ObserverMethod<?> observer, BaseType eventBaseType, java.lang.annotation.Annotation... bindings)
observer
- the observer objectbindings
- the binding set for the eventpublic void removeObserver(ObserverMethod<?> observer)
observer
- the observer objecteventType
- the type of event to listen forbindings
- the binding set for the eventpublic java.lang.String toString()
toString
in class java.lang.Object
observerMethod
- the observer method