Interface ObserverMethod<T>

  • Type Parameters:
    T - the event type

    public interface ObserverMethod<T>

    Represents an observer method of an enabled bean. Defines everything the container needs to know about an observer method.

    • Method Detail

      • getBeanClass

        java.lang.Class<?> getBeanClass​()

        Obtains the class of the type that declares the observer method.

        the defining class
      • getObservedType

        java.lang.reflect.Type getObservedType​()
        Obtains the observed event type.
        the observed event type
      • getObservedQualifiers

        java.util.Set<java.lang.annotation.Annotation> getObservedQualifiers​()
        Obtains the set of observed event qualifiers.
        the observed event qualifiers
      • getReception

        Reception getReception​()
        Obtains the specified Reception for the observer method. This indicates if the observer is conditional or not.
        the Reception
      • notify

        void notify​(T event)

        Calls the observer method, passing the given event object.

        The implementation of notify(Object) for a custom observer method is responsible for deciding whether to call the method if the getReception() returns Reception.IF_EXISTS.

        event - the event object