T - The type of event being wrappedpublic class EventImpl<T> extends AbstractFacade<T,Event<T>> implements Event<T>, Serializable
Event,
Serialized FormAbstractFacade.AbstractFacadeSerializationProxy<T,X>| Modifier and Type | Method and Description |
|---|---|
void |
fire(T event)
Fires an event with the specified qualifiers and notifies observers.
|
<U extends T> |
fireAsync(U event)
Fires an event asynchronously with the specified qualifiers and notifies synchronous and asynchronous observers.
|
<U extends T> |
fireAsync(U event,
Executor executor)
Fires an event asynchronously with the specified qualifiers and notifies synchronous and asynchronous observers.
|
protected Type |
getEventType(Class<?> runtimeType) |
static <E> EventImpl<E> |
of(InjectionPoint injectionPoint,
BeanManagerImpl beanManager) |
Event<T> |
select(Annotation... qualifiers)
Obtains a child Event for the given additional required qualifiers.
|
<U extends T> |
select(Class<U> subtype,
Annotation... qualifiers)
Obtains a child Event for the given required type and additional required qualifiers.
|
<U extends T> |
select(TypeLiteral<U> subtype,
Annotation... qualifiers)
Obtains a child Event for the given required type and additional required qualifiers.
|
String |
toString()
Gets a string representation
|
equals, getBeanManager, getCreationalContext, getFacadeType, getInjectionPoint, getQualifiers, getType, hashCodepublic static <E> EventImpl<E> of(InjectionPoint injectionPoint, BeanManagerImpl beanManager)
public String toString()
public void fire(T event)
EventFires an event with the specified qualifiers and notifies observers.
public <U extends T> CompletionStage<U> fireAsync(U event)
EventFires an event asynchronously with the specified qualifiers and notifies synchronous and asynchronous observers.
fireAsync in interface Event<T>event - the event objectCompletionStage allowing further pipeline composition on the asynchronous operation.
if any of the synchronous or asynchronous observers notified by this event throws an exception
then the resulting CompletionStage is completed exceptionally with FireAsyncException
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.public <U extends T> CompletionStage<U> fireAsync(U event, Executor executor)
Event
Fires an event asynchronously with the specified qualifiers and notifies synchronous and asynchronous observers.
A custom Executor will be used to make asynchronous calls
fireAsync in interface Event<T>event - the event objectexecutor - a custom executor to execute asynchronous eventCompletionStage allowing further pipeline composition on the asynchronous operation.
if any of the synchronous or asynchronous observers notfied by this event throws an exception
then the resulting CompletionStage is completed exceptionally with FireAsyncException
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.public Event<T> select(Annotation... qualifiers)
EventObtains a child Event for the given additional required qualifiers.
public <U extends T> Event<U> select(Class<U> subtype, Annotation... qualifiers)
EventObtains a child Event for the given required type and additional required qualifiers.
public <U extends T> Event<U> select(TypeLiteral<U> subtype, Annotation... qualifiers)
EventObtains a child Event for the given required type and additional required qualifiers.
select in interface Event<T>U - the specified typesubtype - a TypeLiteral representing the specified typequalifiers - the additional specified qualifiersCopyright © 2015. All Rights Reserved.