Class EventImpl<T>

    • Method Detail

      • toString

        public String toString()
        Gets a string representation
        Overrides:
        toString in class Object
        Returns:
        A string representation
      • fire

        public void fire​(T event)
        Description copied from interface: Event

        Fires an event with the specified qualifiers and notifies observers.

        Specified by:
        fire in interface Event<T>
        Parameters:
        event - the event object
      • fireAsync

        public <U extends TCompletionStage<U> fireAsync​(U event)
        Description copied from interface: Event

        Fires an event asynchronously with the specified qualifiers and notifies asynchronous observers.

        Specified by:
        fireAsync in interface Event<T>
        Type Parameters:
        U - event type
        Parameters:
        event - the event object
        Returns:
        a CompletionStage allowing further pipeline composition on the asynchronous operation. Default asynchronous execution facility is container specific. If any observer notified by this event throws an exception then the resulting CompletionStage is completed exceptionally with CompletionException that wraps all the exceptions raised by observers as suppressed exception. If no exception is thrown by observers then the resulting CompletionStage is completed normally with the event payload.
      • fireAsync

        public <U extends TCompletionStage<U> fireAsync​(U event,
                                                          NotificationOptions options)
        Description copied from interface: Event

        Fires an event asynchronously with the specified qualifiers and notifies asynchronous observers. A custom Executor will be used to make asynchronous calls

        Specified by:
        fireAsync in interface Event<T>
        Type Parameters:
        U - event type
        Parameters:
        event - the event object
        options - the notification options
        Returns:
        a CompletionStage allowing further pipeline composition on the asynchronous operation. Default asynchronous execution facility is container specific. If any observer notified by this event throws an exception then the resulting CompletionStage is completed exceptionally with CompletionException that wraps all the exceptions raised by observers as suppressed exception. If no exception is thrown by observers then the resulting CompletionStage is completed normally with the event payload.
      • select

        public WeldEvent<T> select​(Annotation... qualifiers)
        Description copied from interface: Event

        Obtains a child Event for the given additional required qualifiers.

        Specified by:
        select in interface Event<T>
        Specified by:
        select in interface WeldEvent<T>
        Parameters:
        qualifiers - the additional specified qualifiers
        Returns:
        the child Event
      • select

        public <U extends TWeldEvent<U> select​(Class<U> subtype,
                                                 Annotation... qualifiers)
        Description copied from interface: Event

        Obtains a child Event for the given required type and additional required qualifiers.

        Specified by:
        select in interface Event<T>
        Specified by:
        select in interface WeldEvent<T>
        Type Parameters:
        U - the specified type
        Parameters:
        subtype - a Class representing the specified type
        qualifiers - the additional specified qualifiers
        Returns:
        the child Event
      • select

        public <U extends TWeldEvent<U> select​(TypeLiteral<U> subtype,
                                                 Annotation... qualifiers)
        Description copied from interface: Event

        Obtains a child Event for the given required type and additional required qualifiers.

        Specified by:
        select in interface Event<T>
        Specified by:
        select in interface WeldEvent<T>
        Type Parameters:
        U - the specified type
        Parameters:
        subtype - a TypeLiteral representing the specified type
        qualifiers - the additional specified qualifiers
        Returns:
        the child Event
      • select

        public <X> WeldEvent<X> select​(Type type,
                                       Annotation... qualifiers)
        Description copied from interface: WeldEvent

        Obtains a child Event for the given required type and additional required qualifiers. Must be invoked on Event<T> where T is Object.

        Specified by:
        select in interface WeldEvent<T>
        Type Parameters:
        X - the required type
        Parameters:
        type - a Type representing the required type
        qualifiers - the additional required qualifiers
        Returns:
        the child Event
      • getEventType

        protected Type getEventType​(Class<?> runtimeType)