T - The type of event being wrappedpublic class EventImpl<T> extends AbstractFacade<T,Event<T>> implements ExperimentalEvent<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 with the specified qualifiers and notifies observers asynchronously.
|
<U extends T> |
fireAsync(U event,
Executor executor)
Same as
ExperimentalEvent.fireAsync(Object) but allows an executor, which is used for asynchronous event delivery, to be specified. |
protected Type |
getEventType(Class<?> runtimeType) |
static <E> EventImpl<E> |
of(InjectionPoint injectionPoint,
BeanManagerImpl beanManager) |
ExperimentalEvent<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)
ExperimentalEventFires an event with the specified qualifiers and notifies observers asynchronously.
Observers bound to a transaction phase are registered to be executed in the corresponding transaction phase.
Observers with TransactionPhase.IN_PROGRESS are notified in a configured thread pool. The ordering of
observers is preserved. The message may be mutable and is guaranteed to be safely propagated between observers.
The returned CompletionStage allows actions, which execute upon termination of this asynchronous dispatch, to be registered.
fireAsync in interface ExperimentalEvent<T>U - the event typeevent - the event objectCompletionStagepublic <U extends T> CompletionStage<U> fireAsync(U event, Executor executor)
ExperimentalEventExperimentalEvent.fireAsync(Object) but allows an executor, which is used for asynchronous event delivery, to be specified.fireAsync in interface ExperimentalEvent<T>U - the event typeevent - the event objectexecutor - the executor to be used for asynchronous event deliverypublic ExperimentalEvent<T> select(Annotation... qualifiers)
EventObtains a child Event for the given additional required qualifiers.
public <U extends T> ExperimentalEvent<U> select(Class<U> subtype, Annotation... qualifiers)
EventObtains a child Event for the given required type and additional required qualifiers.
public <U extends T> ExperimentalEvent<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>select in interface ExperimentalEvent<T>U - the specified typesubtype - a TypeLiteral representing the specified typequalifiers - the additional specified qualifiersCopyright © 2015. All Rights Reserved.