Weld SVN: r4291 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 01:08:08 -0400 (Sun, 25 Oct 2009)
New Revision: 4291
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 05:04:06 UTC (rev 4290)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 05:08:08 UTC (rev 4291)
@@ -26,7 +26,7 @@
* 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 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
15 years, 1 month
Weld SVN: r4290 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 01:04:06 -0400 (Sun, 25 Oct 2009)
New Revision: 4290
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java
Log:
minor
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java 2009-10-25 05:03:37 UTC (rev 4289)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java 2009-10-25 05:04:06 UTC (rev 4290)
@@ -18,8 +18,9 @@
package javax.enterprise.event;
/**
- * <p>Wraps checked exceptions thrown by observer methods,
- * allowing them to be rethrown by the container.</p>
+ * <p>Wraps checked exceptions thrown by observer methods
+ * during event notification, allowing them to be rethrown
+ * by the container.</p>
*
* @author Pete Muir
* @author Gavin King
15 years, 1 month
Weld SVN: r4289 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 01:03:37 -0400 (Sun, 25 Oct 2009)
New Revision: 4289
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java
api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
Log:
doc observer exception
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java 2009-10-25 04:44:44 UTC (rev 4288)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java 2009-10-25 05:03:37 UTC (rev 4289)
@@ -18,10 +18,11 @@
package javax.enterprise.event;
/**
- * Wraps any checked exceptions which occur during the notification of an
- * observer
+ * <p>Wraps checked exceptions thrown by observer methods,
+ * allowing them to be rethrown by the container.</p>
*
* @author Pete Muir
+ * @author Gavin King
*/
public class ObserverException extends RuntimeException
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 04:44:44 UTC (rev 4288)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 05:03:37 UTC (rev 4289)
@@ -43,6 +43,19 @@
* so portable applications should not rely upon the order in which
* observers are called.</p>
*
+ * <p>Observer methods may throw exceptions:</p>
+ *
+ * <ul>
+ * <li>If the observer method is a
+ * {@linkplain javax.enterprise.event.TransactionPhase transactional
+ * observer method}, any exception is caught and logged by the container.</li>
+ * <li>Otherwise, the exception aborts processing of the event.
+ * No other observer methods of that event will be called. The
+ * exception is rethrown. If the exception is a checked exception,
+ * it is wrapped and rethrown as an (unchecked)
+ * {@link javax.enterprise.event.ObserverException}.</li>
+ * </ul>
+ *
* @see javax.enterprise.event.Observes
* @see javax.enterprise.event.Event
*/
15 years, 1 month
Weld SVN: r4288 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 00:44:44 -0400 (Sun, 25 Oct 2009)
New Revision: 4288
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/TransactionPhase.java
Log:
minor
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/TransactionPhase.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/TransactionPhase.java 2009-10-25 04:42:24 UTC (rev 4287)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/TransactionPhase.java 2009-10-25 04:44:44 UTC (rev 4288)
@@ -18,7 +18,7 @@
/**
* <p>Distinguishes the various kinds of transactional observer methods
- * from observer methods which are notified immediately.</p>
+ * from regular observer methods which are notified immediately.</p>
*
* <p>Transactional observer methods are observer methods which receive
* event notifications during the before or after completion phase of the
15 years, 1 month
Weld SVN: r4287 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 00:42:24 -0400 (Sun, 25 Oct 2009)
New Revision: 4287
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/TransactionPhase.java
Log:
better
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/TransactionPhase.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/TransactionPhase.java 2009-10-25 04:42:05 UTC (rev 4286)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/TransactionPhase.java 2009-10-25 04:42:24 UTC (rev 4287)
@@ -17,45 +17,51 @@
package javax.enterprise.event;
/**
- * The enumeration {@link TransactionPhase} identifies the kind
- * of transactional observer method
+ * <p>Distinguishes the various kinds of transactional observer methods
+ * from observer methods which are notified immediately.</p>
*
- * Transactional observer methods are observer methods which receive event
- * notifications during the before or after completion phase of the
+ * <p>Transactional observer methods are observer methods which receive
+ * event notifications during the before or after completion phase of the
* transaction in which the event was fired. If no transaction is in progress
* when the event is fired, they are notified at the same time as other
- * observers.
+ * observers.</p>
*
- *
* @author Pete Muir
+ * @author Gavin King
*
*/
public enum TransactionPhase
{
+ /**
+ * <p>Identifies a regular observer method, called when the event
+ * is fired.</p>
+ */
IN_PROGRESS,
/**
- * A before completion observer method is called during the before completion
- * phase of the transaction.
+ * <p>Identifies a before completion observer method, called during
+ * the before completion phase of the transaction.</p>
*/
BEFORE_COMPLETION,
/**
- * An after completion observer method is called during the after completion
- * phase of the transaction.
+ * <p>Identifies an after completion observer method, called during the
+ * after completion phase of the transaction.</p>
*/
AFTER_COMPLETION,
/**
- * An after failure observer method is called during the after completion
- * phase of the transaction, only when the transaction fails.
+ * <p>Identifies an after failure observer method, called during the
+ * after completion phase of the transaction, only when the transaction
+ * fails.</p>
*/
AFTER_FAILURE,
/**
- * A before completion observer method is called during the before completion
- * phase of the transaction.
+ * <p>Identifies an after success observer method, called during the
+ * after completion phase of the transaction, only when the transaction
+ * completes successfully.</p>
*/
AFTER_SUCCESS
15 years, 1 month
Weld SVN: r4286 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 00:42:05 -0400 (Sun, 25 Oct 2009)
New Revision: 4286
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/Reception.java
Log:
better
Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/Reception.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/Reception.java 2009-10-25 04:39:28 UTC (rev 4285)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/Reception.java 2009-10-25 04:42:05 UTC (rev 4286)
@@ -17,10 +17,17 @@
package javax.enterprise.event;
/**
- * An enumeration that is used to declare the condition under which an observer
- * method should be called. The default behavior is to create the bean and
- * invoke the observer method synchronously.
+ * <p>Distinguishes conditional observer methods from observer methods
+ * which are always notified.</p>
*
+ * <p>A conditional observer method is an observer method which is notified
+ * of an event only if an instance of the bean that defines the observer
+ * method already exists in the current context.</p>
+ *
+ * <p>Beans with scope
+ * {@link javax.enterprise.context.Dependent @Dependent} may not
+ * have conditional observer methods.</p>
+ *
* @author Gavin King
* @author Dan Allen
* @author David Allen
@@ -34,7 +41,7 @@
IF_EXISTS,
/**
- * Specifies that an observer method always receives the event notifications.
+ * Specifies that an observer method always receives event notifications.
*/
ALWAYS
}
\ No newline at end of file
15 years, 1 month
Weld SVN: r4285 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 00:39:28 -0400 (Sun, 25 Oct 2009)
New Revision: 4285
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
Log:
warning
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 04:39:08 UTC (rev 4284)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 04:39:28 UTC (rev 4285)
@@ -39,6 +39,10 @@
* if all the observed event qualifiers it specifies are event qualifiers
* of the event.</p>
*
+ * <p>The order in which observer methods are called in not defined, and
+ * so portable applications should not rely upon the order in which
+ * observers are called.</p>
+ *
* @see javax.enterprise.event.Observes
* @see javax.enterprise.event.Event
*/
15 years, 1 month
Weld SVN: r4284 - api/trunk/cdi/src/main/java/javax/enterprise/event.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 00:39:08 -0400 (Sun, 25 Oct 2009)
New Revision: 4284
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java
Log:
example
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 02:01:42 UTC (rev 4283)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/Event.java 2009-10-25 04:39:08 UTC (rev 4284)
@@ -31,9 +31,15 @@
* @Inject @Any Event<LoggedInEvent> loggedInEvent;
* </pre>
*
- * <p>The method {@link javax.enterprise.event.Event#fire(T)} accepts
- * an event object:</p>
+ * <p>The <tt>fire()</tt> method accepts an event object:</p>
*
+ * <pre>
+ * public void login() {
+ * ...
+ * loggedInEvent.fire( new LoggedInEvent(user) );
+ * }
+ * </pre>
+ *
* <p>Any combination of qualifiers may be specified at the injection
* point:</p>
*
15 years, 1 month
Weld SVN: r4283 - 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 22:01:42 -0400 (Sat, 24 Oct 2009)
New Revision: 4283
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:57:19 UTC (rev 4282)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 02:01:42 UTC (rev 4283)
@@ -1,5 +1,6 @@
/**
- * <p>This contains annotations and interfaces relating to events.<p>
+ * <p>This package 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
15 years, 1 month
Weld SVN: r4282 - 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:57:19 -0400 (Sat, 24 Oct 2009)
New Revision: 4282
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java
Log:
fix, and add exceptions
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java 2009-10-25 01:55:54 UTC (rev 4281)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java 2009-10-25 01:57:19 UTC (rev 4282)
@@ -107,36 +107,42 @@
{
/**
- * <p>Obtains a child <tt>Instance</tt> for a given required type and additional
- * required qualifiers. If no required type is given, the required type is the
- * same as the parent.
+ * <p>Obtains a child <tt>Instance</tt> for the given additional
+ * required qualifiers.</p>
*
* @param qualifiers the additional required qualifiers
* @return the child <tt>Instance</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 Instance<T> select(Annotation... qualifiers);
/**
- * <p>Obtains a child <tt>Instance</tt> for a given required type and additional
- * required qualifiers. If no required type is given, the required type is the
- * same as the parent.
+ * <p>Obtains a child <tt>Instance</tt> for the given required type and
+ * additional required qualifiers.</p>
*
* @param <U> the required type
* @param subtype a {@link java.lang.Class} representing the required type
* @param qualifiers the additional required qualifiers
* @return the child <tt>Instance</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> Instance<U> select(Class<U> subtype, Annotation... qualifiers);
/**
- * <p>Obtains a child <tt>Instance</tt> for a given required type and additional
- * required qualifiers. If no required type is given, the required type is the
- * same as the parent.
+ * <p>Obtains a child <tt>Instance</tt> for the given required type and
+ * additional required qualifiers.</p>
*
* @param <U> the required type
* @param subtype a {@link javax.enterprise.inject.TypeLiteral} representing the required type
* @param qualifiers the additional required qualifiers
* @return the child <tt>Instance</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> Instance<U> select(TypeLiteral<U> subtype, Annotation... qualifiers);
15 years, 1 month