org.jboss.weld.event

Class ObserverNotifier

  • Direct Known Subclasses:
    TransactionalObserverNotifier


    public class ObserverNotifierextends Object
    Provides event-related operations such as observer method resolution and event delivery. An ObserverNotifier may be created with strict checks enabled. In such case event type checks are performed. Otherwise, the ObserverNotifier is called lenient. The lenient version should be used for internal dispatching of events only.
    Author:
    Jozef Hartinger, David Allen
    • Method Detail

      • resolveObserverMethods

        public <T> ResolvedObservers<T> resolveObserverMethods(Type eventType,                                                       Annotation... qualifiers)
        Resolves observer methods based on the given event type and qualifiers. If strict checks are enabled the given type is verified.
        Parameters:
        event - the event object
        qualifiers - given event qualifiers
        Returns:
        resolved observer methods
      • resolveObserverMethods

        public <T> ResolvedObservers<T> resolveObserverMethods(Type eventType,                                                       Set<Annotation> qualifiers)
        Resolves observer methods based on the given event type and qualifiers. If strict checks are enabled the given type is verified.
        Parameters:
        event - the event object
        qualifiers - given event qualifiers
        Returns:
        resolved observer methods
      • resolveObserverMethods

        public <T> ResolvedObservers<T> resolveObserverMethods(Resolvable resolvable)
        Resolves observer methods using the given resolvable.
        Parameters:
        resolvable - the given resolvable
        Returns:
        resolved observer methods
      • fireEvent

        public void fireEvent(Object event,                      EventMetadata metadata,                      Annotation... qualifiers)
        Delivers the given event object to observer methods resolved based on the runtime type of the event object and given event qualifiers. If strict checks are enabled the event object type is verified.
        Parameters:
        event - the event object
        metadata - event metadata
        qualifiers - event qualifiers
      • fireEvent

        public void fireEvent(Type eventType,                      Object event,                      Annotation... qualifiers)
        Delivers the given event object to observer methods resolved based on the given event type and qualifiers. If strict checks are enabled the given type is verified.
        Parameters:
        eventType - the given event type
        event - the given event object
        qualifiers - event qualifiers
      • fireEvent

        public void fireEvent(Object event,                      Resolvable resolvable)
        Delivers the given event object to observer methods resolved based on the given resolvable. If strict checks are enabled the event object type is verified.
        Parameters:
        event - the given event object
        resolvable -
      • clear

        public void clear()
        Clears cached observer method resolutions and event type checks.
      • checkEventObjectType

        protected void checkEventObjectType(Object event)
      • checkEventObjectType

        public void checkEventObjectType(Type eventType)
        If strict checks are enabled this method performs event type checks on the given type. More specifically it verifies that no type variables nor wildcards are present within the event type. In addition, this method verifies, that the event type is not assignable to a container lifecycle event type. If strict checks are not enabled then this method does not perform any action.
        Parameters:
        eventType - the given event type
        Throws:
        IllegalArgumentException - if the strict mode is enabled and the event type contains a type variable, wildcard or is assignable to a container lifecycle event type
      • notify

        public <T> void notify(ResolvedObservers<T> observers,                       T event,                       EventMetadata metadata)
        Delivers the given event object to given observer methods. Event metadata is made available for injection into observer methods, if needed.
        Parameters:
        observers - the given observer methods
        event - the given event object
        metadata - event metadata
      • notifyTransactionObservers

        protected <T> void notifyTransactionObservers(Set<ObserverMethod<? super T>> observers,                                              T event,                                              EventMetadata metadata)

Copyright © 2015. All Rights Reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14