Weld SVN: r4281 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 21:55:54 -0400 (Sat, 24 Oct 2009)
New Revision: 4281
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java
Log:
finish
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java 2009-10-25 01:36:19 UTC (rev 4280)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java 2009-10-25 01:55:54 UTC (rev 4281)
@@ -22,8 +22,7 @@
import javax.enterprise.inject.TypeLiteral;
/**
- * <p>Allows the application to fire events of a particular type,
- * and register observers for events of that type.</p>
+ * <p>Allows the application to fire events of a particular type.</p>
*
* <p>Beans fire events via an instance of the <tt>Event</tt>
* interface, which may be injected:</p>
@@ -52,13 +51,12 @@
* <p>For an injected <tt>Event</tt>:</p>
*
* <ul>
- * <li>the specified type is the type parameter specified at the injection
- * point, and</li>
- * <li>the specified qualifiers are the qualifiers specified at the injection
- * point.</li>
+ * <li>the <em>specified type</em> is the type parameter specified at the
+ * injection point, and</li>
+ * <li>the <em>specified qualifiers</em> are the qualifiers specified at
+ * the injection point.</li>
* </ul>
*
- *
* @author Gavin King
* @author Pete Muir
* @author David Allen
@@ -70,34 +68,51 @@
{
/**
- * Fire an event
+ * <p>Fires an event with the specified qualifiers and notifies
+ * observers.</p>
*
- * @param event the event type
+ * @param event the event object
+ * @throws IllegalArgumentException if the runtime type of the event object contains a type variable
*/
public void fire(T event);
/**
- * Returns a child Event with the additional specified qualifiers.
- * @param qualifiers Additional qualifiers to add to child Event
- * @return new child Event
+ * <p>Obtains a child <tt>Event</tt> for the given additional
+ * required qualifiers.</p>
+ *
+ * @param qualifiers the additional specified qualifiers
+ * @return the child <tt>Event</tt>
+ * @throws IllegalArgumentException if passed two instances of the
+ * same qualifier type, or an instance of an annotation that is not
+ * a qualifier type
*/
public Event<T> select(Annotation... qualifiers);
/**
- * Returns a child Event of the type specified and additional specified qualifiers.
- * @param <U> The subtype of T for the child Event
- * @param subtype The class of the subtype of T
- * @param qualifiers Additional specified qualifiers
- * @return new child Event
+ * <p>Obtains a child <tt>Event</tt> for the given required type and
+ * additional required qualifiers.</p>
+ *
+ * @param <U> the specified type
+ * @param subtype a {@link java.lang.Class} representing the specified type
+ * @param qualifiers the additional specified qualifiers
+ * @return the child <tt>Event</tt>
+ * @throws IllegalArgumentException if passed two instances of the
+ * same qualifier type, or an instance of an annotation that is not
+ * a qualifier type
*/
public <U extends T> Event<U> select(Class<U> subtype, Annotation... qualifiers);
/**
- * Returns a child Event of the type specified and additional specified qualifiers.
- * @param <U> The subtype of T for the child Event
- * @param subtype The TypeLiteral of the subtype of T
- * @param qualifiers Additional specified qualifiers
- * @return new child Event
- */
+ * <p>Obtains a child <tt>Event</tt> for the given required type and
+ * additional required qualifiers.</p>
+ *
+ * @param <U> the specified type
+ * @param subtype a {@link javax.enterprise.inject.TypeLiteral} representing the specified type
+ * @param qualifiers the additional specified qualifiers
+ * @return the child <tt>Event</tt>
+ * @throws IllegalArgumentException if passed two instances of the
+ * same qualifier type, or an instance of an annotation that is not
+ * a qualifier type
+ */
public <U extends T> Event<U> select(TypeLiteral<U> subtype, Annotation... qualifiers);
}
15 years, 2 months
Weld SVN: r4280 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 21:36:19 -0400 (Sat, 24 Oct 2009)
New Revision: 4280
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java
Log:
partway-done javadoc for Event
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java 2009-10-25 01:35:33 UTC (rev 4279)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java 2009-10-25 01:36:19 UTC (rev 4280)
@@ -22,15 +22,48 @@
import javax.enterprise.inject.TypeLiteral;
/**
- * An interface for firing events of a particular type, and registering
- * observers for events of that type.
+ * <p>Allows the application to fire events of a particular type,
+ * and register observers for events of that type.</p>
*
+ * <p>Beans fire events via an instance of the <tt>Event</tt>
+ * interface, which may be injected:</p>
+ *
+ * <pre>
+ * @Inject @Any Event<LoggedInEvent> loggedInEvent;
+ * </pre>
+ *
+ * <p>The method {@link javax.enterprise.event.Event#fire(T)} accepts
+ * an event object:</p>
+ *
+ * <p>Any combination of qualifiers may be specified at the injection
+ * point:</p>
+ *
+ * <pre>
+ * @Inject @Admin Event<LoggedInEvent> adminLoggedInEvent;
+ * </pre>
+ *
+ * <p>Or, the {@link javax.enterprise.inject.Any @Any} qualifier may
+ * be used, allowing the application to specify qualifiers dynamically:</p>
+ *
+ * <pre>
+ * @Inject @Any Event<LoggedInEvent> loggedInEvent;
+ * </pre>
+ *
+ * <p>For an injected <tt>Event</tt>:</p>
+ *
+ * <ul>
+ * <li>the specified type is the type parameter specified at the injection
+ * point, and</li>
+ * <li>the specified qualifiers are the qualifiers specified at the injection
+ * point.</li>
+ * </ul>
+ *
+ *
* @author Gavin King
* @author Pete Muir
* @author David Allen
*
- * @param <T>
- * the type of the event object
+ * @param <T> the type of the event object
*/
public interface Event<T>
@@ -44,27 +77,27 @@
public void fire(T event);
/**
- * Returns a child Event with the additional specified bindings.
- * @param bindings Additional bindings to add to child Event
+ * Returns a child Event with the additional specified qualifiers.
+ * @param qualifiers Additional qualifiers to add to child Event
* @return new child Event
*/
- public Event<T> select(Annotation... bindings);
+ public Event<T> select(Annotation... qualifiers);
/**
- * Returns a child Event of the type specified and additional specified bindings.
+ * Returns a child Event of the type specified and additional specified qualifiers.
* @param <U> The subtype of T for the child Event
* @param subtype The class of the subtype of T
- * @param bindings Additional specified bindings
+ * @param qualifiers Additional specified qualifiers
* @return new child Event
*/
- public <U extends T> Event<U> select(Class<U> subtype, Annotation... bindings);
+ public <U extends T> Event<U> select(Class<U> subtype, Annotation... qualifiers);
/**
- * Returns a child Event of the type specified and additional specified bindings.
+ * Returns a child Event of the type specified and additional specified qualifiers.
* @param <U> The subtype of T for the child Event
* @param subtype The TypeLiteral of the subtype of T
- * @param bindings Additional specified bindings
+ * @param qualifiers Additional specified qualifiers
* @return new child Event
*/
- public <U extends T> Event<U> select(TypeLiteral<U> subtype, Annotation... bindings);
+ public <U extends T> Event<U> select(TypeLiteral<U> subtype, Annotation... qualifiers);
}
15 years, 2 months
Weld SVN: r4279 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 21:35:33 -0400 (Sat, 24 Oct 2009)
New Revision: 4279
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java
Log:
ups
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java 2009-10-25 01:35:07 UTC (rev 4278)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java 2009-10-25 01:35:33 UTC (rev 4279)
@@ -29,7 +29,7 @@
* a parameter of a method of a bean class.</p>
*
* <pre>
- * public void afterLogin(@Observes LoggedInEvent event) { ... }
+ * public void afterLogin(@Observes LoggedInEvent event) { ... }
* </pre>
*
* <p>An observer method allows the application to receive and respond to event
15 years, 2 months
Weld SVN: r4278 - api/trunk/cdi/src/main/java/javax/enterprise/inject.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 21:35:07 -0400 (Sat, 24 Oct 2009)
New Revision: 4278
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java
Log:
ups
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java 2009-10-25 01:34:21 UTC (rev 4277)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java 2009-10-25 01:35:07 UTC (rev 4278)
@@ -172,7 +172,7 @@
* <ul>
* <li>It is not a non-static inner class.</li>
* <li>It is a concrete class, or is annotated
- * {@link javax.enterprise.context.Decorator @Decorator}.</li>
+ * {@link javax.decorator.Decorator @Decorator}.</li>
* <li>It is not annotated with an EJB component-defining annotation or declared
* as an EJB bean class in <tt>ejb-jar.xml</tt>.</li>
* <li>It has an appropriate constructor; either the class has a constructor with
15 years, 2 months
Weld SVN: r4277 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 21:34:21 -0400 (Sat, 24 Oct 2009)
New Revision: 4277
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/BeanManager.java
Log:
bindings->qualifiers
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/BeanManager.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/BeanManager.java 2009-10-25 01:10:51 UTC (rev 4276)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/BeanManager.java 2009-10-25 01:34:21 UTC (rev 4277)
@@ -81,15 +81,15 @@
public <T> CreationalContext<T> createCreationalContext(Contextual<T> contextual);
/**
- * Returns the set of beans which match the given required type and bindings
+ * Returns the set of beans which match the given required type and qualifiers
* and are accessible to the class into which the BeanManager was injected,
* according to the rules of typesafe resolution.
*
* Typesafe resolution usually occurs at container deployment time.
*
* @param beanType the type of the beans to be resolved
- * @param bindings the bindings used to restrict the matched beans. If no
- * bindings are passed to getBeans(), the default binding @Current
+ * @param qualifiers the qualifiers used to restrict the matched beans. If no
+ * qualifiers are passed to getBeans(), the default binding @Current
* is assumed.
* @return the matched beans
* @throws IllegalArgumentException if the given type represents a type
@@ -99,7 +99,7 @@
* @throws IllegalArgumentException if an instance of an annotation that is
* not a binding type is given
*/
- public Set<Bean<?>> getBeans(Type beanType, Annotation... bindings);
+ public Set<Bean<?>> getBeans(Type beanType, Annotation... qualifiers);
/**
* Returns the set of beans which match the given EL name and are accessible
@@ -150,7 +150,7 @@
* Fire an event
*
* @param event the event object
- * @param bindings the event bindings used to restrict the observers matched
+ * @param qualifiers the event qualifiers used to restrict the observers matched
* @throws IllegalArgumentException if the runtime type of the event object
* contains a type variable
* @throws IllegalArgumentException if two instances of the same binding type
@@ -158,14 +158,14 @@
* @throws IllegalArgumentException if an instance of an annotation that is
* not a binding type is given,
*/
- public void fireEvent(Object event, Annotation... bindings);
+ public void fireEvent(Object event, Annotation... qualifiers);
/**
- * Obtains observers for an event by considering event type and bindings.
+ * Obtains observers for an event by considering event type and qualifiers.
*
* @param <T> the type of the event to obtain
* @param event the event object
- * @param bindings the bindings used to restrict the matched observers
+ * @param qualifiers the qualifiers used to restrict the matched observers
* @return the resolved observers
* @throws IllegalArgumentException if a parameterized type with a type
* parameter or a wildcard is passed
@@ -174,14 +174,14 @@
* @throws IllegalArgumentException if two instances of the same binding type
* are passed
*/
- public <T> Set<ObserverMethod<?, T>> resolveObserverMethods(T event, Annotation... bindings);
+ public <T> Set<ObserverMethod<?, T>> resolveObserverMethods(T event, Annotation... qualifiers);
/**
* Obtains an ordered list of enabled decorators for a set of bean types and
- * a set of bindings
+ * a set of qualifiers
*
* @param types the set of bean types of the decorated bean
- * @param bindings the bindings declared by the decorated bean
+ * @param qualifiers the qualifiers declared by the decorated bean
* @return the resolved decorators
* @throws IllegalArgumentException if the set of bean types is empty
* @throws IllegalArgumentException if an annotation which is not a binding
@@ -189,14 +189,14 @@
* @throws IllegalArgumentException if two instances of the same binding type
* are passed
*/
- public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindings);
+ public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... qualifiers);
/**
* Obtains an ordered list of enabled interceptors for a set interceptor
* bindings
*
* @param type the type of the interception
- * @param bindings the bindings used to restrict the matched interceptors
+ * @param interceptorBindings the bindings used to restrict the matched interceptors
* @return the resolved interceptors
* @throws IllegalArgumentException if no interceptor binding type is passed
* @throws IllegalArgumentException if an annotation which is not a
15 years, 2 months
Weld SVN: r4276 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 21:10:51 -0400 (Sat, 24 Oct 2009)
New Revision: 4276
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
Log:
em
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 01:08:57 UTC (rev 4275)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 01:10:51 UTC (rev 4276)
@@ -29,8 +29,9 @@
*
* <p>An {@linkplain javax.enterprise.event.Observes observer method}
* acts as event consumer, observing events of a specific type, the
- * observed event type, with a specific set of qualifiers, the observed
- * event qualifiers. Any Java type may be an observed event type.</p>
+ * <em>observed event type</em>, with a specific set of qualifiers, the
+ * <em>observed event qualifiers</em>. Any Java type may be an observed
+ * event type.</p>
*
* <p>An observer method will be notified of an event if the observed
* event type it specifies is one of the event types of the event, and
15 years, 2 months
Weld SVN: r4275 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 21:08:57 -0400 (Sat, 24 Oct 2009)
New Revision: 4275
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
Log:
minor
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 01:07:08 UTC (rev 4274)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 01:08:57 UTC (rev 4275)
@@ -11,8 +11,9 @@
* <p>An event comprises:</p>
*
* <ul>
- * <li>A Java object�the event object</li>
- * <li>A (possibly empty) set of instances of qualifier types�the event qualifiers</li>
+ * <li>A Java object, called the event object</li>
+ * <li>A (possibly empty) set of instances of qualifier types, called
+ * the event qualifiers</li>
* </ul>
*
* <p>The event object acts as a payload, to propagate state from
15 years, 2 months
Weld SVN: r4274 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 21:07:08 -0400 (Sat, 24 Oct 2009)
New Revision: 4274
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
Log:
package javadoc
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 00:38:16 UTC (rev 4273)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 01:07:08 UTC (rev 4274)
@@ -1,6 +1,43 @@
+/**
+ * <p>This contains annotations and interfaces relating to events.<p>
+ *
+ * <p>Beans may produce and consume events. This facility allows
+ * beans to interact in a completely decoupled fashion, with no
+ * compile-time dependency between the two beans. Most importantly,
+ * it allows stateful beans in one architectural or physical tier
+ * of the application to synchronize their internal state with
+ * state changes that occur in a different tier.</p>
+ *
+ * <p>An event comprises:</p>
+ *
+ * <ul>
+ * <li>A Java object�the event object</li>
+ * <li>A (possibly empty) set of instances of qualifier types�the event qualifiers</li>
+ * </ul>
+ *
+ * <p>The event object acts as a payload, to propagate state from
+ * producer to consumer. The event qualifiers act as topic selectors,
+ * allowing the consumer to narrow the set of events it observes.</p>
+ *
+ * <p>An event object is an instance of a concrete Java class with
+ * no type variables. The event types of the event include all
+ * superclasses and interfaces of the runtime class of the event object.
+ * An event type may not contain a type variable.</p>
+ *
+ * <p>An event qualifier type is just an ordinary qualifier type</p>
+ *
+ * <p>An {@linkplain javax.enterprise.event.Observes observer method}
+ * acts as event consumer, observing events of a specific type, the
+ * observed event type, with a specific set of qualifiers, the observed
+ * event qualifiers. Any Java type may be an observed event type.</p>
+ *
+ * <p>An observer method will be notified of an event if the observed
+ * event type it specifies is one of the event types of the event, and
+ * if all the observed event qualifiers it specifies are event qualifiers
+ * of the event.</p>
+ *
+ * @see javax.enterprise.event.Observes
+ * @see javax.enterprise.event.Event
+ */
package javax.enterprise.event;
-/**
- * The package javax.enterprise.event contains annotations and interfaces
- * relating to events.
- */
15 years, 2 months
Weld SVN: r4273 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 20:38:16 -0400 (Sat, 24 Oct 2009)
New Revision: 4273
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java
Log:
minor
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java 2009-10-25 00:31:06 UTC (rev 4272)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java 2009-10-25 00:38:16 UTC (rev 4273)
@@ -44,7 +44,8 @@
* <p>A bean may declare multiple observer methods.</p>
*
* <p>Each observer method must have exactly one event parameter, of the same
- * type as the event type it observes. When searching for observer methods for
+ * type as the event type it observes. Event qualifiers may be declared
+ * by annotating the event parameter. When searching for observer methods for
* an event, the container considers the type and qualifiers of the event
* parameter.</p>
*
15 years, 2 months
Weld SVN: r4272 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-24 20:31:06 -0400 (Sat, 24 Oct 2009)
New Revision: 4272
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java
Log:
revise this stuff. definition of event bus semantics belongs as package-level docs
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java 2009-10-24 23:00:54 UTC (rev 4271)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/Observes.java 2009-10-25 00:31:06 UTC (rev 4272)
@@ -25,45 +25,34 @@
import java.lang.annotation.Target;
/**
- * <p>
- * Specifies that a parameter of a method of a bean implementation class is the
- * event parameter of an observer method. An observer method is a non-abstract
+ * <p>Identifies the event parameter of an observer method. May be applied to
+ * a parameter of a method of a bean class.</p>
+ *
+ * <pre>
+ * public void afterLogin(@Observes LoggedInEvent event) { ... }
+ * </pre>
+ *
+ * <p>An observer method allows the application to receive and respond to event
+ * notifications.</p>
+ *
+ * <p>An observer method is a non-abstract
* method of a managed bean class or session bean class. An observer method may
* be either static or non-static. If the bean is a session bean, the observer
* method must be either a business method of the EJB or a static method of the
- * bean class. A bean class may also have any number of observer methods
- * declared.
- * </p>
+ * bean class.</p>
*
- * <p>
- * To observe a simple Java class as the event type, the {@literal @}Observes
- * annotation is used directly on the event parameter.</p>
- * <pre>
- * public void afterLogin(@Observes LoggedInEvent event) { ... }
- * </pre>
+ * <p>A bean may declare multiple observer methods.</p>
*
- * <p>
- * Qualifiers may also be added to further differentiate between events of the same
- * type. When multiple qualifiers are used, each of them must exist on the event
- * in order for the observer method to be invoked. Also note that any of the
- * qualifiers may have type members bound to specific values which also must
- * match those of the event object.</p>
- * <pre>
- * public void afterLogin(@Observes @Admin LoggedInEvent event) { ... }
- * public void afterDocumentUpdatedByAdmin(@Observes @Updated @ByAdmin Document doc) { ... }
- * public void afterAdminLogin(@Observes @Role("admin") LoggedInEvent event) { ... }
- * </pre>
+ * <p>Each observer method must have exactly one event parameter, of the same
+ * type as the event type it observes. When searching for observer methods for
+ * an event, the container considers the type and qualifiers of the event
+ * parameter.</p>
*
- * <p>
- * An application may have any number of observers for the same event type. The
- * order in which these observers are called is indeterminate. For this reason,
- * caution must be used if any one of the observers might throw an exception
- * since the remaining observers not yet notified will never see the event.
- * Event processing for a single event is terminated whenever an exception is
- * thrown by an observer. Therefore the code should not make any assumptions
- * about the state of other similar observers.
- * </p>
+ * <p>If the event parameter does not explicitly declare any qualifier, the
+ * observer method observes events with no qualifier.</p>
*
+ * <p>The event parameter type may contain a type variable or wildcard.</p>
+ *
* @author Gavin King
* @author Pete Muir
* @author David Allen
@@ -75,18 +64,22 @@
public @interface Observes
{
/**
- * Specifies when an observer method should be notified of an event.
- * Defaults to ALWAYS meaning that if a bean instance with the observer
- * method does not already exist, one will be created to receive the
- * event.
+ * <p>Specifies
+ * {@linkplain javax.enterprise.event.Reception under what conditions the
+ * observer method is notified}.</p>
+ *
+ * <p>By default, the observer method is notified even if no instance of
+ * the bean that defines the observer method already exists in the current
+ * context.</p>
*/
public Reception notifyObserver() default Reception.ALWAYS;
/**
- * Specifies whether or not the notification should occur as part of
- * an ongoing transaction, and if so, in which phase of the transaction
- * the notification should occur. The default is IN_PROGRESS meaning
- * the notification is not transactional.
+ * <p>Specifies
+ * {@linkplain javax.enterprise.event.Reception at what time the observer
+ * method is notified}.</p>
+ *
+ * <p>By default, the observer method is notified when the event is fired.</p>
*/
public TransactionPhase during() default TransactionPhase.IN_PROGRESS;
}
15 years, 2 months