Weld SVN: r4321 - in api/trunk/cdi/src/main/java/javax/enterprise: event and 1 other directories.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-26 00:59:00 -0400 (Mon, 26 Oct 2009)
New Revision: 4321
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/ContextException.java
api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/AmbiguousResolutionException.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/CreationException.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/IllegalProductException.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/InjectionException.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/ResolutionException.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/UnsatisfiedResolutionException.java
Log:
doc remaining exceptions
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/ContextException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/ContextException.java 2009-10-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/ContextException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -19,12 +19,11 @@
/**
- * The base type for any context-related exceptions.
+ * <p>Indicates a problem relating to context management.</p>
*
* @author Pete Muir
* @author Shane Bryzak
*/
-
public class ContextException extends RuntimeException
{
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-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -18,14 +18,12 @@
package javax.enterprise.event;
/**
- * <p>Wraps checked exceptions thrown by observer methods
- * during event notification, allowing them to be rethrown
- * by the container.</p>
+ * <p>Indicates that a checked exception was thrown by an
+ * observer method during event notification.</p>
*
* @author Pete Muir
* @author Gavin King
*/
-
public class ObserverException extends RuntimeException
{
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/AmbiguousResolutionException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/AmbiguousResolutionException.java 2009-10-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/AmbiguousResolutionException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -14,15 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package javax.enterprise.inject;
/**
- * Thrown when the set of enabled beans with the required bean type and
- * qualifiers contains multiple beans.
+ * <p>Indicates that multiple beans match a certain combination of required
+ * type and required qualifiers and are eligible for injection into a
+ * certain class.</p>
*
* @author Pete Muir
+ * @author Gavin King
*/
public class AmbiguousResolutionException extends ResolutionException
{
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/CreationException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/CreationException.java 2009-10-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/CreationException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -19,9 +19,11 @@
/**
- * Wraps any checked exceptions which occur during creation of a bean.
+ * <p>Indicates that a checked exception was thrown during
+ * creation of a bean.</p>
*
* @author Pete Muir
+ * @author Gavin King
*/
public class CreationException extends InjectionException
{
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/IllegalProductException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/IllegalProductException.java 2009-10-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/IllegalProductException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -18,9 +18,9 @@
/**
- * Thrown if a producer method returns a null value or a producer
- * field contains a null value, and the scope of the method or
- * field is not <tt>@Dependent</tt>.
+ * <p>Indicates that a producer method returned a null value or a producer
+ * field contained a null value, and the scope of the producer method
+ * or field was not {@link javax.enterprise.context.Dependent}.</p>
*/
public class IllegalProductException extends InjectionException
{
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/InjectionException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/InjectionException.java 2009-10-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/InjectionException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -19,9 +19,8 @@
/**
- * Indicates a problem relating to dependency injection.
+ * <t>Indicates a problem relating to dependency injection.</t>
*
- *
* @author Pete Muir
*/
public class InjectionException extends RuntimeException
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-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -79,9 +79,9 @@
*
* <p>The inherited {@link javax.inject.Provider#get()} method returns a
* contextual references for the unique bean that matches the required
- * type and required qualifiers and is eligible for injection into the class
- * into which the parent <tt>Instance</tt> was injected, or throws an
- * {@link javax.enterprise.inject.UnsatisfiedResolutionException} or
+ * type and required qualifiers and is eligible for injection into the
+ * class into which the parent <tt>Instance</tt> was injected, or throws
+ * an {@link javax.enterprise.inject.UnsatisfiedResolutionException} or
* {@link javax.enterprise.inject.AmbiguousResolutionException}.</p>
*
* <pre>PaymentProcessor pp = chequePaymentProcessor.get();</pre>
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/ResolutionException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/ResolutionException.java 2009-10-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/ResolutionException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -18,7 +18,9 @@
/**
- * Thrown if resolution fails
+ * <t>Indicates a problem relating to typesafe resolution.</t>
+ *
+ * @author Gavin King
*/
public class ResolutionException extends InjectionException
{
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java 2009-10-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -25,6 +25,7 @@
* be proxied by the container.</p>
*
* @author Pete Muir
+ * @author Gavin King
*/
public class UnproxyableResolutionException extends ResolutionException
{
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/UnsatisfiedResolutionException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/UnsatisfiedResolutionException.java 2009-10-26 02:55:21 UTC (rev 4320)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/UnsatisfiedResolutionException.java 2009-10-26 04:59:00 UTC (rev 4321)
@@ -14,16 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package javax.enterprise.inject;
-
/**
- * Thrown when the set of enabled beans with the required bean type
- * and qualifiers is empty.
+ * <p>Indicates that no bean matches a certain combination of required
+ * type and required qualifiers and is eligible for injection into a
+ * certain class.</p>
*
* @author Pete Muir
+ * @author Gavin King
*/
public class UnsatisfiedResolutionException extends ResolutionException
{
15 years, 2 months
Weld SVN: r4320 - api/trunk/cdi/src/main/java/javax/enterprise/inject.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 22:55:21 -0400 (Sun, 25 Oct 2009)
New Revision: 4320
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java
Log:
uproxyable bean types
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java 2009-10-26 01:09:28 UTC (rev 4319)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/UnproxyableResolutionException.java 2009-10-26 02:55:21 UTC (rev 4320)
@@ -20,7 +20,9 @@
/**
- * Thrown if a bean has normal scope and cannot be proxied by the container.
+ * <p>Indicates that a contextual reference for a bean with a normal scope
+ * and a certain bean type cannot be obtained because the bean type cannot
+ * be proxied by the container.</p>
*
* @author Pete Muir
*/
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-26 01:09:28 UTC (rev 4319)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java 2009-10-26 02:55:21 UTC (rev 4320)
@@ -314,6 +314,20 @@
* of the Java EE platform and Java Servlet specifications.</li>
* </ul>
*
+ * <h3>Unproxyable bean types</h3>
+ *
+ * <p>Certain legal bean types cannot be proxied by the container:</p>
+ *
+ * <ul>
+ * <li>classes which don't have a non-private constructor with no parameters,</li>
+ * <li>classes which are declared final or have final methods,</li>
+ * <li>primitive types,</li>
+ * <li>and array types.</li>
+ * </ul>
+ *
+ * <p>An injection point whose declared type cannot be proxied by the
+ * container must not resolve to a bean with a normal scope.</p>
+ *
* @see javax.enterprise.inject.Produces
* @see javax.inject.Scope
* @see javax.inject.Named
15 years, 2 months
Weld SVN: r4319 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-10-25 21:09:28 -0400 (Sun, 25 Oct 2009)
New Revision: 4319
Removed:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Producer.java
Log:
Finished the JavaDoc for all lifecycle events.
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java 2009-10-26 00:33:48 UTC (rev 4318)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java 2009-10-26 01:09:28 UTC (rev 4319)
@@ -16,13 +16,73 @@
*/
package javax.enterprise.inject.spi;
+/**
+ * <p>
+ * The container will fire an event of this type for each managed bean, session
+ * bean, Java EE component class supporting injection.
+ * </p>
+ * <p>
+ * Any observer of this event is permitted to wrap and/or replace the
+ * {@link javax.enterprise.inject.spi.InjectionTarget}. The container must use
+ * the final value of this property, after all observers have been called,
+ * whenever it performs injection upon the managed bean, session bean or other
+ * Java EE component class supporting injection.
+ * </p>
+ * <p>
+ * For example, this observer decorates the {@code InjectionTarget} for all
+ * servlets.
+ * </p>
+ *
+ * <pre>
+ * public <T extends Servlet> void decorateServlet(@Observes ProcessInjectionTarget<T> pit)
+ * {
+ * pit.setInjectionTarget(decorate(pit.getInjectionTarget()));
+ * }
+ * </pre>
+ * <p>
+ * If any observer method of a {@code ProcessInjectionTarget} event throws an exception,
+ * the exception is treated as a definition error by the container.
+ * </p>
+ *
+ * @author David Allen
+ * @param <X> The managed bean class, session bean class or Java EE component
+ * class supporting injection
+ */
public interface ProcessInjectionTarget<X>
{
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedType} representing
+ * the managed bean class, session bean class or other Java EE component
+ * class supporting injection.
+ *
+ * @return the {@link javax.enterprise.inject.spi.AnnotatedType} of the bean
+ * with an injection target
+ */
public AnnotatedType<X> getAnnotatedType();
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.InjectionTarget} object
+ * that will be used by the container to perform injection.
+ *
+ * @return the {@link javax.enterprise.inject.spi.InjectionTarget} object
+ * which performs the injection
+ */
public InjectionTarget<X> getInjectionTarget();
+ /**
+ * Replaces the {@link javax.enterprise.inject.spi.InjectionTarget} which
+ * performs injection for this target.
+ *
+ * @param injectionTarget The new
+ * {@link javax.enterprise.inject.spi.InjectionTarget} to use
+ */
public void setInjectionTarget(InjectionTarget<X> injectionTarget);
+ /**
+ * Registers a definition error with the container, causing the container to
+ * abort deployment after bean discovery is complete.
+ *
+ * @param t A {@link java.lang.Throwable} representing the definition error
+ */
public void addDefinitionError(Throwable t);
}
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java 2009-10-26 00:33:48 UTC (rev 4318)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java 2009-10-26 01:09:28 UTC (rev 4319)
@@ -18,27 +18,39 @@
package javax.enterprise.inject.spi;
/**
- * The container fires an event of this type for each observer method
- * that is registered.
+ * <p>
+ * The container fires an event of this type for each
+ * {@linkplain javax.enterprise.inject.spi.ObserverMethod observer method} that
+ * is registered.
+ * </p>
+ * <p>
+ * If any observer method of a {@code ProcessObserverMethod} event throws an
+ * exception, the exception is treated as a definition error by the container.
+ * </p>
*
* @author Gavin King
* @author David Allen
- *
* @param <X> The bean type containing the observer method
* @param <T> The type of the event being observed
*/
public interface ProcessObserverMethod<X, T>
{
/**
- * The AnnotatedMethod representing the observer method
- * @return the AnnotatedMethod representing the observer method
+ * The {@link javax.enterprise.inject.spi.AnnotatedMethod} representing the
+ * observer method.
+ *
+ * @return the {@link javax.enterprise.inject.spi.AnnotatedMethod}
+ * representing the observer method
*/
public AnnotatedMethod<X> getAnnotatedMethod();
/**
- * The ObserverMethod object that will be used by the container
- * to invoke the observer when a matching event is fired.
- * @return the ObserverMethod object that will be used by the container to call the observer method
+ * The {@link javax.enterprise.inject.spi.ObserverMethod} object that will be
+ * used by the container to invoke the observer when a matching event is
+ * fired.
+ *
+ * @return the {@link javax.enterprise.inject.spi.ObserverMethod} object that
+ * will be used by the container to call the observer method
*/
public ObserverMethod<X, T> getObserverMethod();
@@ -46,7 +58,7 @@
* Registers a definition error with the container, causing the container to
* abort deployment after bean discovery is complete.
*
- * @param t A throwable representing the definition error
+ * @param t A {@link java.lang.Throwable} representing the definition error
*/
public void addDefinitionError(Throwable t);
}
Deleted: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java 2009-10-26 00:33:48 UTC (rev 4318)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java 2009-10-26 01:09:28 UTC (rev 4319)
@@ -1,26 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.enterprise.inject.spi;
-
-public interface ProcessProcessObserverMethod<X, T>
-{
- public AnnotatedMethod<X> getAnnotatedMethod();
-
- public ObserverMethod<X, T> getObserverMethod();
-
- public void addDefinitionError(Throwable t);
-}
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java 2009-10-26 00:33:48 UTC (rev 4318)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java 2009-10-26 01:09:28 UTC (rev 4319)
@@ -17,13 +17,77 @@
package javax.enterprise.inject.spi;
+/**
+ * <p>
+ * The container will fire an event of this type for each
+ * {@linkplain javax.enterprise.inject.Produces producer method or field},
+ * including resources.
+ * </p>
+ * <p>
+ * Any observer of this event is permitted to wrap and/or replace the {@code
+ * Producer}. The container must use the final value of this property, after all
+ * observers have been called, whenever it calls the producer or disposer.
+ * </p>
+ * <p>
+ * For example, this observer decorates the {@code Producer} for the all producer
+ * methods and field of type {@code EntityManager}.
+ * </p>
+ *
+ * <pre>
+ * void decorateEntityManager(@Observes ProcessProducer<?, EntityManager> pp)
+ * {
+ * pit.setProducer(decorate(pp.getProducer()));
+ * }
+ * </pre>
+ * <p>
+ * If any observer method of a {@code ProcessProducer} event throws an exception, the
+ * exception is treated as a definition error by the container.
+ * </p>
+ *
+ * @author David Allen
+ * @param <T> The bean class of the bean that declares the producer method or
+ * field
+ * @param <X> The return type of the producer method or the type of the producer
+ * field
+ */
public interface ProcessProducer<T, X>
{
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedField}
+ * representing the producer field or the
+ * {@link javax.enterprise.inject.spi.AnnotatedMethod} representing the
+ * producer method.
+ *
+ * @return the {@link javax.enterprise.inject.spi.AnnotatedMember}
+ * representing the producer
+ */
public AnnotatedMember<T> getAnnotatedMember();
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.Producer} object that will
+ * be used by the container to call the producer method or read the producer
+ * field.
+ *
+ * @return the {@link javax.enterprise.inject.spi.Producer} invoker object
+ * used by the container
+ */
public Producer<X> getProducer();
+ /**
+ * Replaces the {@link javax.enterprise.inject.spi.Producer} object that will
+ * be used by the container to call the producer method or read the producer
+ * field.
+ *
+ * @param producer the new {@link javax.enterprise.inject.spi.Producer}
+ * object to use
+ */
public void setProducer(Producer<X> producer);
+ /**
+ * Registers a definition error with the container, causing the container to
+ * abort deployment after bean discovery is complete.
+ *
+ * @param t The definition error to register as a {@link java.lang.Throwable}
+ */
public void addDefinitionError(Throwable t);
}
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Producer.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Producer.java 2009-10-26 00:33:48 UTC (rev 4318)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/Producer.java 2009-10-26 01:09:28 UTC (rev 4319)
@@ -21,12 +21,12 @@
import javax.enterprise.context.spi.CreationalContext;
/**
- * The interface javax.enterprise.inject.spi.Producer provides a generic
+ * The interface {@link javax.enterprise.inject.spi.Producer} provides a generic
* operation for producing an instance of a type.
*
* @author Pete Muir
*
- * @param <T>
+ * @param <T> The class of object produced by the producer
*/
public interface Producer<T>
{
15 years, 2 months
Weld SVN: r4318 - api/trunk/cdi/src/main/java/javax/enterprise/context.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 20:33:48 -0400 (Sun, 25 Oct 2009)
New Revision: 4318
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/ContextNotActiveException.java
Log:
simplify, since it did not really give any extra information
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/ContextNotActiveException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/ContextNotActiveException.java 2009-10-26 00:26:45 UTC (rev 4317)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/ContextNotActiveException.java 2009-10-26 00:33:48 UTC (rev 4318)
@@ -19,15 +19,13 @@
/**
- * A {@link ContextNotActiveException} is thrown if at a particular point in the
- * execution of the program the context is inactive with respect to the current
- * thread. When the context is inactive, any invocation of the get() from the
- * current thread upon the Context object for that scope results in a
- * ContextNotActiveException.
+ * <p>Indicates that a context is not active.</p>
*
+ * @see javax.enterprise.context.spi.Context
*
* @author Pete Muir
* @author Shane Bryzak
+ * @author Gavin King
*/
public class ContextNotActiveException extends ContextException
15 years, 2 months
Weld SVN: r4317 - api/trunk/cdi/src/main/java/javax/enterprise/context.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 20:26:45 -0400 (Sun, 25 Oct 2009)
New Revision: 4317
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/Dependent.java
Log:
doc @Dependent
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/Dependent.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/Dependent.java 2009-10-25 23:16:04 UTC (rev 4316)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/Dependent.java 2009-10-26 00:26:45 UTC (rev 4317)
@@ -27,11 +27,74 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import javax.enterprise.context.spi.Contextual;
import javax.inject.Scope;
/**
- * Specifies that a bean is dependent scoped.
+ * <p>Specifies that a bean belongs to the dependent pseudo-scope.</p>
*
+ * <p>Beans declared with scope <tt>@Dependent</tt> behave differently
+ * to beans with other built-in scope types. When a bean is declared
+ * to have scope <tt>@Dependent</tt>:</p>
+ *
+ * <ul>
+ * <li>No injected instance of the bean is ever shared between
+ * multiple injection points.</li>
+ * <li>Any instance of the bean injected into an object that is being
+ * created by the container is bound to the lifecycle of the newly
+ * created object.</li>
+ * <li>When a Unified EL expression in a JSF or JSP page that refers
+ * to the bean by its EL name is evaluated, at most one instance of
+ * the bean is instantiated. This instance exists to service just a
+ * single evaluation of the EL expression. It is reused if the bean
+ * EL name appears multiple times in the EL expression, but is never
+ * reused when the EL expression is evaluated again, or when another
+ * EL expression is evaluated.</li>
+ * <li>Any instance of the bean that receives a producer method,
+ * producer field, disposer method or observer method invocation
+ * exists to service that invocation only.</li>
+ * <li>Any instance of the bean injected into method parameters of a
+ * disposer method or observer method exists to service the method
+ * invocation only.</li>
+ * </ul>
+ *
+ * <p>Every invocation of the
+ * {@link javax.enterprise.context.spi.Context#get(Contextual, CreationalContext)}
+ * operation of the context object for the <tt>@Dependent</tt> scope
+ * returns a new instance of the given bean.</p>
+ *
+ * <p>Every invocation of the
+ * {@link javax.enterprise.context.spi.Context#get(Contextual)}
+ * operation of the context object for the <tt>@Dependent</tt> scope
+ * returns a null value.</p>
+ *
+ * <p>The <tt>@Dependent</tt> scope is always active.</p>
+ *
+ * <p>Many instances of beans with scope <tt>@Dependent</tt> belong
+ * to some other bean or Java EE component class instance and are
+ * called dependent objects.</p>
+ *
+ * <ul>
+ * <li>Instances of decorators and interceptors are dependent
+ * objects of the bean instance they decorate.</li>
+ * <li>An instance of a bean with scope <tt>@Dependent</tt> injected
+ * into a field, bean constructor or initializer method is a dependent
+ * object of the bean or Java EE component class instance into
+ * which it was injected.</li>
+ * <li>An instance of a bean with scope <tt>@Dependent</tt> injected
+ * into a producer method is a dependent object of the producer method
+ * bean instance that is being produced.</li>
+ * <li>An instance of a bean with scope <tt>@Dependent</tt> obtained by
+ * direct invocation of an {@link javax.enterprise.inject.Instance} is
+ * a dependent object of the instance of
+ * {@link javax.enterprise.inject.Instance}.</li>
+ * </ul>
+ *
+ * <p>When the container destroys an instance of a bean or of any Java
+ * EE component class supporting injection, the container destroys all
+ * its dependent objects, after the <tt>@PreDestroy</tt> callback completes
+ * and after the servlet <tt>destroy()</tt> method is called.</p>
+ *
* @author Gavin King
* @author Pete Muir
*/
15 years, 2 months
Weld SVN: r4316 - api/trunk/cdi/src/main/java/javax/enterprise/context.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 19:16:04 -0400 (Sun, 25 Oct 2009)
New Revision: 4316
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/NormalScope.java
Log:
minor
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/NormalScope.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/NormalScope.java 2009-10-25 23:15:11 UTC (rev 4315)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/NormalScope.java 2009-10-25 23:16:04 UTC (rev 4316)
@@ -25,7 +25,7 @@
import java.lang.annotation.Target;
/**
- * <tt>Specifies that an annotation type is a normal scope type.</tt>
+ * <p>Specifies that an annotation type is a normal scope type.</p>
*
* @author Gavin King
* @author Pete Muir
@@ -38,8 +38,8 @@
{
/**
- * @return true if this is a passivating scope (beans with this scope
- * type must be serializable)
+ * @return true if this is a passivating scope type (if beans with
+ * this scope type must be serializable)
*/
boolean passivating() default false;
15 years, 2 months
Weld SVN: r4315 - api/trunk/cdi/src/main/java/javax/enterprise/context.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 19:15:11 -0400 (Sun, 25 Oct 2009)
New Revision: 4315
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/ContextException.java
Log:
minor
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/ContextException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/ContextException.java 2009-10-25 23:12:33 UTC (rev 4314)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/ContextException.java 2009-10-25 23:15:11 UTC (rev 4315)
@@ -19,7 +19,7 @@
/**
- * A ContextException is the base type for any context problem
+ * The base type for any context-related exceptions.
*
* @author Pete Muir
* @author Shane Bryzak
15 years, 2 months
Weld SVN: r4314 - api/trunk/cdi/src/main/java/javax/enterprise/context.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-25 19:12:33 -0400 (Sun, 25 Oct 2009)
New Revision: 4314
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/ApplicationScoped.java
api/trunk/cdi/src/main/java/javax/enterprise/context/BusyConversationException.java
api/trunk/cdi/src/main/java/javax/enterprise/context/Conversation.java
api/trunk/cdi/src/main/java/javax/enterprise/context/ConversationScoped.java
api/trunk/cdi/src/main/java/javax/enterprise/context/NonexistentConversationException.java
api/trunk/cdi/src/main/java/javax/enterprise/context/NormalScope.java
api/trunk/cdi/src/main/java/javax/enterprise/context/RequestScoped.java
api/trunk/cdi/src/main/java/javax/enterprise/context/SessionScoped.java
Log:
javadoc for rest of context pkg
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/ApplicationScoped.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/ApplicationScoped.java 2009-10-25 23:07:53 UTC (rev 4313)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/ApplicationScoped.java 2009-10-25 23:12:33 UTC (rev 4314)
@@ -29,8 +29,38 @@
/**
- * Specifies that a bean is application scoped.
+ * <p>Specifies that a bean is application scoped.</p>
*
+ * <p>The application scope is active:</p>
+ *
+ * <ul>
+ * <li>during the <tt>service()</tt> method of any servlet in
+ * the web application, during the <tt>doFilter()</tt> method of
+ * any servlet filter and when the container calls any
+ * <tt>ServletContextListener</tt>, <tt>HttpSessionListener</tt>,
+ * <tt>AsyncListener</tt> or <tt>ServletRequestListener</tt>,</li>
+ * <li>during any Java EE web service invocation,</li>
+ * <li>during any asynchronous observer method notification,</li>
+ * <li>during any remote method invocation of any EJB, during
+ * any asynchronous method invocation of any EJB, during any
+ * call to an EJB timeout method and during message delivery
+ * to any EJB message-driven bean,</li>
+ * <li>during any message delivery to a <tt>MessageListener</tt>
+ * for a JMS topic or queue obtained from the Java EE component
+ * environment, and</li>
+ * <li>when the disposer method or <tt>@PreDestroy</tt> callback of
+ * any bean with any normal scope other than <tt>@ApplicationScoped</tt>
+ * is called.</li>
+ * </ul>
+ *
+ * <p>The application context is shared between all servlet
+ * requests, asynchronous observer method notifications, web
+ * service invocations, EJB remote method invocations, EJB
+ * asynchronous method invocations, EJB timeouts and message
+ * deliveries to message-driven beans that execute within the
+ * same application. The application context is destroyed when
+ * the application is shut down.</p>
+ *
* @author Gavin King
* @author Pete Muir
*/
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/BusyConversationException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/BusyConversationException.java 2009-10-25 23:07:53 UTC (rev 4313)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/BusyConversationException.java 2009-10-25 23:12:33 UTC (rev 4314)
@@ -18,15 +18,20 @@
package javax.enterprise.context;
/**
- * The container ensures that a long-running conversation may be associated with
+ * <p>Indicates that the container has rejected a request because a concurrent
+ * request is associated with the same conversation context.</p>
+ *
+ * <p>The container ensures that a long-running conversation may be associated with
* at most one request at a time, by blocking or rejecting concurrent requests.
* If the container rejects a request, it must associate the request with a new
* transient conversation and throw an exception of type
- * {@link BusyConversationException} from the restore view phase of the JSF
- * lifecycle.
+ * <tt>BusyConversationException</tt> from the restore view phase of the JSF
+ * lifecycle.</p>
*
+ * @see javax.enterprise.context.ConversationScoped
*
* @author Pete Muir
+ * @author Gavin King
*/
public class BusyConversationException extends ContextException
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/Conversation.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/Conversation.java 2009-10-25 23:07:53 UTC (rev 4313)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/Conversation.java 2009-10-25 23:12:33 UTC (rev 4314)
@@ -17,70 +17,82 @@
package javax.enterprise.context;
/**
- * Provides conversation management operations
+ * <p>Allows the application to manage the conversation context
+ * by marking the current conversation as transient or long-running,
+ * specifying a conversation identifier, or setting the conversation
+ * timeout.</p>
*
+ * <p>An instance may be injected:</p>
+ *
+ * <pre>
+ * @Inject Conversation conversation;
+ * </pre>
+ *
+ * <p>The conversation timeout is a hint to the container
+ * that a conversation should not be destroyed if it has been
+ * active within the last given interval in milliseconds.</p>
+ *
* @author Pete Muir
+ * @author Gavin King
*
*/
public interface Conversation
{
/**
- * Mark a transient conversation long running. The container will generate an
- * id
+ * <p>Mark the current transient conversation long-running. A
+ * conversation identifier is generated by the container.</p>
*
- * @throws IllegalStateException if the current conversation is marked long
- * running
+ * @throws IllegalStateException if the current conversation
+ * is already marked long-running.
*/
public void begin();
/**
- * Mark a transient conversation long running.
+ * <p>Mark the current transient conversation long-running,
+ * with a specified identifier.</p>
*
- * @param id the id of the conversation
- * @throws IllegalStateException if the current conversation is marked long
- * running
- * @throws IllegalArgumentException if a long running conversation with id
- * already exists
+ * @throws IllegalStateException if the current conversation
+ * is already marked long-running.
+ * @throws IllegalArgumentException if a conversation with
+ * the specified identifier already exists.
*/
public void begin(String id);
/**
- * Mark a long running conversation transient
+ * <p>Marks the current long-running conversation transient.</p>
*
- * @throws IllegalStateException if the current conversation is marked
- * transient
+ * @throws IllegalStateException if the current conversation
+ * is already marked transient.
*/
public void end();
/**
- * Get the id associated with the current long running conversation
+ * <p>Get the identifier of the current long-running conversation.</p>
*
- * @return the id of the current long running conversation
+ * @return the identifier of the current long-running conversation,
+ * or a null value if the current conversation is transient.
*/
public String getId();
/**
- * Get the timeout for the current long running conversation.
+ * <p>Get the timeout of the current conversation.</p>
*
- * The conversation will destroy the conversation if it has not been accessed
- * within this time period.
- *
- * @return the current timeout in milliseconds
+ * @return the current timeout in milliseconds.
*/
public long getTimeout();
/**
- * Set the timeout for the current long running conversation
+ * <p>Set the timeout of the current conversation.</p>
*
- * @param milliseconds the new timeout in milliseconds
+ * @param milliseconds the new timeout in milliseconds.
*/
public void setTimeout(long milliseconds);
/**
- * @return true if the conversation is marked transient, or false if it is
- * marked long-running.
+ * @return <tt>true</tt> if the conversation is marked transient,
+ * or <tt>false</tt>if it is marked long-running.
*/
public boolean isTransient();
}
\ No newline at end of file
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/ConversationScoped.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/ConversationScoped.java 2009-10-25 23:07:53 UTC (rev 4313)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/ConversationScoped.java 2009-10-25 23:12:33 UTC (rev 4314)
@@ -27,8 +27,92 @@
import java.lang.annotation.Target;
/**
- * Specifies that a bean is conversation scoped.
+ * <p>Specifies that a bean is conversation scoped.</p>
*
+ * <p>The conversation scope is active:</p>
+ *
+ * <ul>
+ * <li>during all standard lifecycle phases of any JSF faces or
+ * non-faces request.</li>
+ * </ul>
+ *
+ * <p>The conversation context provides access to state associated
+ * with a particular conversation. Every JSF request has an
+ * associated conversation. This association is managed
+ * automatically by the container according to the following
+ * rules:</p>
+ *
+ * <ul>
+ * <li>Any JSF request has exactly one associated conversation.</li>
+ * <li>The conversation associated with a JSF request is determined
+ * at the beginning of the restore view phase and does not change
+ * during the request.</li>
+ * </ul>
+ *
+ * <p>Any conversation is in one of two states: <em>transient</em>
+ * or <em>long-running</em>.</p>
+ *
+ * <ul>
+ * <li>By default, a conversation is transient</li>
+ * <li>A transient conversation may be marked long-running by calling
+ * {@link javax.enterprise.context.Conversation#begin()}</li>
+ * <li>A long-running conversation may be marked transient by calling
+ * {@link javax.enterprise.context.Conversation#end()}</li>
+ * </ul>
+ *
+ * <p>All long-running conversations have a string-valued unique
+ * identifier, which may be set by the application when the
+ * conversation is marked long-running, or generated by the container.</p>
+ *
+ * <p>If the conversation associated with the current JSF request
+ * is in the transient state at the end of a JSF request, it is
+ * destroyed, and the conversation context is also destroyed.</p>
+ *
+ * <p>If the conversation associated with the current JSF request
+ * is in the long-running state at the end of a JSF request, it is
+ * not destroyed. Instead, it may be propagated to other requests
+ * according to the following rules:</p>
+ *
+ * <ul>
+ * <li>The long-running conversation context associated with a
+ * request that renders a JSF view is automatically propagated
+ * to any faces request (JSF form submission) that originates
+ * from that rendered page.</li>
+ * <li>The long-running conversation context associated with a
+ * request that results in a JSF redirect (a redirect resulting
+ * from a navigation rule or JSF NavigationHandler) is
+ * automatically propagated to the resulting non-faces request,
+ * and to any other subsequent request to the same URL. This is
+ * accomplished via use of a GET request parameter named <tt>cid</tt>
+ * containing the unique identifier of the conversation.</li>
+ * <li>The long-running conversation associated with a request
+ * may be propagated to any non-faces request via use of a GET
+ * request parameter named <tt>cid</tt> containing the unique identifier
+ * of the conversation. In this case, the application must manage
+ * this request parameter.</li>
+ * </ul>
+ *
+ * <p>When no conversation is propagated to a JSF request, the
+ * request is associated with a new transient conversation. All
+ * long-running conversations are scoped to a particular HTTP
+ * servlet session and may not cross session boundaries. In the
+ * following cases, a propagated long-running conversation cannot
+ * be restored and reassociated with the request:</p>
+ *
+ * <ul>
+ * <li>When the HTTP servlet session is invalidated, all
+ * long-running conversation contexts created during the current
+ * session are destroyed, after the servlet <tt>service()</tt>
+ * method completes.</li>
+ * <li>The container is permitted to arbitrarily destroy any
+ * long-running conversation that is associated with no current
+ * JSF request, in order to conserve resources.</li>
+ * </ul>
+ *
+ * @see javax.enterprise.context.Conversation
+ * @see javax.enterprise.context.NonexistentConversationException
+ * @see javax.enterprise.context.BusyConversationException
+ *
* @author Gavin King
* @author Pete Muir
*/
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/NonexistentConversationException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/NonexistentConversationException.java 2009-10-25 23:07:53 UTC (rev 4313)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/NonexistentConversationException.java 2009-10-25 23:12:33 UTC (rev 4314)
@@ -18,15 +18,17 @@
package javax.enterprise.context;
/**
- * If the propagated conversation cannot be restored, the container must
+ * <p>Indicates that the conversation context could not be restored.</p>
+ *
+ * <p>If the propagated conversation cannot be restored, the container must
* associate the request with a new transient conversation and throw an
- * exception of type {@link NonexistentConversationException} from the
- * restore view phase of the JSF lifecycle. The application may handle this
- * exception using the JSF ExceptionHandler.
+ * exception of type <tt>NonexistentConversationException</tt> from the
+ * restore view phase of the JSF lifecycle.</p>
*
+ * @see javax.enterprise.context.ConversationScoped
*
- *
* @author Pete Muir
+ * @author Gavin King
*/
public class NonexistentConversationException extends ContextException
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/NormalScope.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/NormalScope.java 2009-10-25 23:07:53 UTC (rev 4313)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/NormalScope.java 2009-10-25 23:12:33 UTC (rev 4314)
@@ -25,7 +25,7 @@
import java.lang.annotation.Target;
/**
- * Specifies that an annotation type is a scope type.
+ * <tt>Specifies that an annotation type is a normal scope type.</tt>
*
* @author Gavin King
* @author Pete Muir
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/RequestScoped.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/RequestScoped.java 2009-10-25 23:07:53 UTC (rev 4313)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/RequestScoped.java 2009-10-25 23:12:33 UTC (rev 4314)
@@ -28,8 +28,40 @@
import java.lang.annotation.Target;
/**
- * Specifies that a bean is request scoped.
+ * <p>Specifies that a bean is request scoped.</p>
*
+ * <p>The request scope is active:</p>
+ *
+ * <ul>
+ * <li>during the <tt>service()</tt> method of any servlet in the web
+ * application, during the <tt>doFilter()</tt> method of any servlet
+ * filter and when the container calls any <tt>ServletRequestListener</tt>
+ * or <tt>AsyncListener</tt>,</li>
+ * <li>during any Java EE web service invocation,</li>
+ * <li>during any asynchronous observer method notification,</li>
+ * <li>during any remote method invocation of any EJB, during
+ * any asynchronous method invocation of any EJB, during any
+ * call to an EJB timeout method and during message delivery
+ * to any EJB message-driven bean, and</li>
+ * <li>during any message delivery to a MessageListener for
+ * a JMS topic or queue obtained from the Java EE component
+ * environment.</li>
+ * </ul>
+ *
+ * <p>The request context is destroyed:</p>
+ *
+ * <ul>
+ * <li>at the end of the servlet request, after the <tt>service()</tt>
+ * method, all <tt>doFilter()</tt> methods, and all <tt>requestDestroyed()</tt>
+ * and <tt>onComplete()</tt> notifications return,</li>
+ * <li>after the web service invocation completes,</li>
+ * <li>after the asynchronous observer notification completes,</li>
+ * <li>after the EJB remote method invocation, asynchronous
+ * method invocation, timeout or message delivery completes, or</li>
+ * <li>after the message delivery to the <tt>MessageListener</tt>
+ * completes.</li>
+ * </ul>
+ *
* @author Gavin King
* @author Pete Muir
*/
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/SessionScoped.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/SessionScoped.java 2009-10-25 23:07:53 UTC (rev 4313)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/SessionScoped.java 2009-10-25 23:12:33 UTC (rev 4314)
@@ -28,8 +28,26 @@
import java.lang.annotation.Target;
/**
- * Specifies that a bean is session scoped.
+ * <p>Specifies that a bean is session scoped.</p>
*
+ * <p>The session scope is active:</p>
+ *
+ * <ul>
+ * <li>during the <tt>service()</tt> method of any servlet
+ * in the web application, during the doFilter() method of
+ * any servlet filter and when the container calls any
+ * <tt>HttpSessionListener</tt>, <tt>AsyncListener</tt> or
+ * <tt>ServletRequestListener</tt>.</li>
+ * </ul>
+ *
+ * <p>The session context is shared between all servlet
+ * requests that occur in the same HTTP session. The session
+ * context is destroyed when the HTTPSession times out,
+ * after all <tt>HttpSessionListeners</tt> have been called,
+ * and at the very end of any request in which
+ * <tt>invalidate()</tt> was called, after all filters and
+ * <tt>ServletRequestListeners</tt> have been called.</p>
+ *
* @author Gavin King
* @author Pete Muir
*/
15 years, 2 months
Weld SVN: r4313 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2009-10-25 19:07:53 -0400 (Sun, 25 Oct 2009)
New Revision: 4313
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java
Log:
Additional JavaDoc for lifecycle events.
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java 2009-10-25 18:19:30 UTC (rev 4312)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java 2009-10-25 23:07:53 UTC (rev 4313)
@@ -46,7 +46,9 @@
* @param scopeType The annotation type to treat as a
* {@linkplain javax.enterprise.context scope type}
* @param normal Indicates if the scope is normal
- * @param passivating Indicates if the scope is passivation capable
+ * @param passivating Indicates if the scope is
+ * {@linkplain javax.enterprise.inject.spi.PassivationCapable
+ * passivation capable}
*/
public void addScope(Class<? extends Annotation> scopeType, boolean normal, boolean passivating);
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java 2009-10-25 18:19:30 UTC (rev 4312)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java 2009-10-25 23:07:53 UTC (rev 4313)
@@ -16,11 +16,58 @@
*/
package javax.enterprise.inject.spi;
+/**
+ * <p>
+ * The container fires this event for each Java class or interface it discovers,
+ * before it reads the declared annotations.
+ * </p>
+ * <p>
+ * Any observer of this event is permitted to wrap and/or replace the
+ * {@link javax.enterprise.inject.spi.AnnotatedType}. The container must use the
+ * final value of this property, after all observers have been called, to
+ * discover the types and read the annotations of the program elements.
+ * </p>
+ * <p>
+ * For example, the following observer decorates the
+ * {@link javax.enterprise.inject.spi.AnnotatedType} for every class that is
+ * discovered by the container.
+ * </p>
+ *
+ * <pre>
+ * public <T> void decorateAnnotatedType(@Observes ProcessAnnotatedType<T> pat)
+ * {
+ * pat.setAnnotatedType(decorate(pat.getAnnotatedType()));
+ * }
+ * </pre>
+ * <p>
+ * If any observer method of a {@code ProcessAnnotatedType} event throws an
+ * exception, the exception is treated as a definition error by the container.
+ * </p>
+ *
+ * @author David Allen
+ * @see javax.enterprise.inject.spi.AnnotatedType
+ * @param <X> The class being annotated
+ */
public interface ProcessAnnotatedType<X>
{
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedType} object that
+ * will be used by the container to read the declared annotations.
+ *
+ * @return the {@code AnnotatedType} object
+ */
public AnnotatedType<X> getAnnotatedType();
+ /**
+ * Replaces the {@link javax.enterprise.inject.spi.AnnotatedType}.
+ *
+ * @param type the new {@link javax.enterprise.inject.spi.AnnotatedType}
+ * object to use
+ */
public void setAnnotatedType(AnnotatedType<X> type);
+ /**
+ * Forces the container to ignore this type.
+ */
public void veto();
}
\ No newline at end of file
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessBean.java 2009-10-25 18:19:30 UTC (rev 4312)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessBean.java 2009-10-25 23:07:53 UTC (rev 4313)
@@ -16,11 +16,68 @@
*/
package javax.enterprise.inject.spi;
+/**
+ * <p>
+ * The container fires an event of this type for each bean it discovers, before
+ * registering the {@link javax.enterprise.inject.spi.Bean} object.
+ * </p>
+ * <p>
+ * The event object type in the package javax.enterprise.inject.spi depends upon
+ * what kind of bean was discovered:
+ * </p>
+ * <ul>
+ * <li>For a managed bean with bean class X, the container must raise an event
+ * of type {@link javax.enterprise.inject.spi.ProcessManagedBean}<X>.</li>
+ * <li>For a session bean with bean class X, the container must raise an event
+ * of type {@link javax.enterprise.inject.spi.ProcessSessionBean}<X>.</li>
+ * <li>For a producer method with method return type X of a bean with bean class
+ * T, the container must raise an event of type
+ * {@link javax.enterprise.inject.spi.ProcessProducerMethod}<T, X>.</li>
+ * <li>For a producer field with field type X of a bean with bean class T, the
+ * container must raise an event of type
+ * {@link javax.enterprise.inject.spi.ProcessProducerField}<T, X>.</li>
+ * </ul>
+ * <p>
+ * Resources are considered to be producer fields.
+ * </p>
+ * <p>
+ * If any observer method of a {@code ProcessBean} event throws an exception,
+ * the exception is treated as a definition error by the container.
+ * </p>
+ *
+ * @author David Allen
+ * @param <X> The class of the bean
+ */
public interface ProcessBean<X>
{
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedType} representing
+ * the bean class, the {@link javax.enterprise.inject.spi.AnnotatedMethod}
+ * representing the producer method, or the
+ * {@link javax.enterprise.inject.spi.AnnotatedField} representing the
+ * producer field.
+ *
+ * @return the {@link javax.enterprise.inject.spi.AnnotatedType} for the bean
+ * being registered
+ */
public Annotated getAnnotated();
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.Bean} object that is about
+ * to be registered. The {@link javax.enterprise.inject.spi.Bean} may
+ * implement {@link javax.enterprise.inject.spi.Interceptor} or
+ * {@link javax.decorator.Decorator}.
+ *
+ * @return the {@link javax.enterprise.inject.spi.Bean} object about to be
+ * registered
+ */
public Bean<X> getBean();
+ /**
+ * Registers a definition error with the container, causing the container to
+ * abort deployment after bean discovery is complete.
+ *
+ * @param t The definition error to register as a {@link java.lang.Throwable}
+ */
public void addDefinitionError(Throwable t);
}
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java 2009-10-25 18:19:30 UTC (rev 4312)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java 2009-10-25 23:07:53 UTC (rev 4313)
@@ -16,7 +16,27 @@
*/
package javax.enterprise.inject.spi;
+/**
+ * <p>
+ * The container fires an event of this type for each managed bean it discovers,
+ * before registering the {@link javax.enterprise.inject.spi.Bean} object.
+ * </p>
+ * <p>
+ * If any observer method of a {@code ProcessManagedBean} event throws an
+ * exception, the exception is treated as a definition error by the container.
+ * </p>
+ *
+ * @author David Allen
+ * @param <X> The class of the bean
+ */
public interface ProcessManagedBean<X> extends ProcessBean<X>
{
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedType} representing
+ * the bean class.
+ *
+ * @return the {@link javax.enterprise.inject.spi.AnnotatedType} for the bean
+ * being registered
+ */
public AnnotatedType<X> getAnnotatedBeanClass();
}
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java 2009-10-25 18:19:30 UTC (rev 4312)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java 2009-10-25 23:07:53 UTC (rev 4313)
@@ -16,7 +16,29 @@
*/
package javax.enterprise.inject.spi;
+/**
+ * <p>
+ * The container fires an event of this type for each producer field it
+ * discovers, before registering the corresponding
+ * {@link javax.enterprise.inject.spi.Bean} object.
+ * </p>
+ * <p>
+ * If any observer method of a {@code ProcessProducerField} event throws an
+ * exception, the exception is treated as a definition error by the container.
+ * </p>
+ *
+ * @author David Allen
+ * @param <T> The class of the producer field
+ * @param <X> The class of the bean representing the producer field
+ */
public interface ProcessProducerField<T, X> extends ProcessBean<X>
{
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedField}
+ * representing the producer field.
+ *
+ * @return the {@link javax.enterprise.inject.spi.AnnotatedField} for the
+ * producer field being registered
+ */
public AnnotatedField<T> getAnnotatedProducerField();
}
\ No newline at end of file
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java 2009-10-25 18:19:30 UTC (rev 4312)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java 2009-10-25 23:07:53 UTC (rev 4313)
@@ -16,9 +16,38 @@
*/
package javax.enterprise.inject.spi;
+/**
+ * <p>
+ * The container fires an event of this type for each producer method it
+ * discovers, before registering the corresponding
+ * {@link javax.enterprise.inject.spi.Bean} object.
+ * </p>
+ * <p>
+ * If any observer method of a {@code ProcessProducerMethod} event throws an
+ * exception, the exception is treated as a definition error by the container.
+ * </p>
+ *
+ * @author David Allen
+ * @param <T> The class of the return type of the producer method
+ * @param <X> The class of the bean representing the producer method
+ */
public interface ProcessProducerMethod<T, X> extends ProcessBean<X>
{
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedMethod}
+ * representing the producer method.
+ *
+ * @return the {@link javax.enterprise.inject.spi.AnnotatedMethod} for the
+ * producer method being registered
+ */
public AnnotatedMethod<T> getAnnotatedProducerMethod();
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedParameter} for
+ * any matching injection point of the same type as the producer method
+ * return type found on a disposal method.
+ *
+ * @return the disposal method's {@link javax.enterprise.inject.spi.AnnotatedParameter}
+ */
public AnnotatedParameter<T> getAnnotatedDisposedParameter();
}
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java 2009-10-25 18:19:30 UTC (rev 4312)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java 2009-10-25 23:07:53 UTC (rev 4313)
@@ -17,11 +17,42 @@
package javax.enterprise.inject.spi;
+/**
+ * <p>
+ * The container fires an event of this type for each session bean it discovers,
+ * before registering the {@link javax.enterprise.inject.spi.Bean} object.
+ * </p>
+ * <p>
+ * If any observer method of a {@code ProcessSessionBean} event throws an
+ * exception, the exception is treated as a definition error by the container.
+ * </p>
+ *
+ * @author David Allen
+ * @param <X>
+ */
public interface ProcessSessionBean<X> extends ProcessManagedBean<Object>
{
+ /**
+ * Returns the {@link javax.enterprise.inject.spi.AnnotatedType} representing
+ * the bean class.
+ *
+ * @return the {@link javax.enterprise.inject.spi.AnnotatedType} for the bean
+ * being registered
+ */
public AnnotatedType<X> getAnnotatedSessionBeanClass();
+ /**
+ * Returns the EJB name of the session bean.
+ *
+ * @return the name of the EJB
+ */
public String getEjbName();
+ /**
+ * Returns a {@link javax.enterprise.inject.spi.SessionBeanType} representing the
+ * kind of session bean.
+ *
+ * @return the {@link javax.enterprise.inject.spi.SessionBeanType}
+ */
public SessionBeanType getSessionBeanType();
}
\ No newline at end of file
15 years, 2 months
Weld SVN: r4312 - 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 14:19:30 -0400 (Sun, 25 Oct 2009)
New Revision: 4312
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
Log:
important link
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 18:01:52 UTC (rev 4311)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java 2009-10-25 18:19:30 UTC (rev 4312)
@@ -17,6 +17,9 @@
* the event qualifiers</li>
* </ul>
*
+ * <p>The {@link javax.enterprise.event.Event} interface is used to
+ * fire events.</p>
+ *
* <h3>Event objects and event types</h3>
*
* <p>The event object acts as a payload, to propagate state from
15 years, 2 months