You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gp...@apache.org on 2010/07/12 15:50:25 UTC
svn commit: r963281 -
/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/Conversation.java
Author: gpetracek
Date: Mon Jul 12 13:50:25 2010
New Revision: 963281
URL: http://svn.apache.org/viewvc?rev=963281&view=rev
Log:
EXTCDI-1, EXTCDI-2 and EXTCDI-3 added javadoc
Modified:
myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/Conversation.java
Modified: myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/Conversation.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/Conversation.java?rev=963281&r1=963280&r2=963281&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/Conversation.java (original)
+++ myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/Conversation.java Mon Jul 12 13:50:25 2010
@@ -27,10 +27,31 @@ import java.io.Serializable;
*/
public interface Conversation extends Serializable
{
+ /**
+ * Deactivates the conversation and un-scopes all bean instances immediately.<br/>
+ * At the next cleanup the whole conversation will be destroyed.
+ * (If an inactive {@link org.apache.myfaces.extensions.cdi.core.api.scope.conversation.Conversation}
+ * gets resolved before the cleanup, the
+ * {@link org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowContext} has to destroy it.
+ * -> A new conversation will be created immediately.
+ */
void end();
+ /**
+ * Un-scopes all bean instances immediately.
+ * Instead of destroying the whole conversation the conversation stays active.
+ * (The conversation will be marked as used.)<br/>
+ * As soon as an instance of a bean is requested,
+ * the instance will be created based on the original bean descriptor.
+ * This approach allows a better performance, if the conversation is needed immediately.
+ */
void restart();
+ /**
+ * @param key class of the requested bean
+ * @param <T> type of the requested bean
+ * @return an instance of the requested bean if the conversation is active - null otherwise
+ */
<T> T getBean(Class<T> key);
}