You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2007/10/07 18:33:10 UTC
svn commit: r582643 - in
/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra:
connectionManager/ conversation/
Author: skitching
Date: Sun Oct 7 09:33:05 2007
New Revision: 582643
URL: http://svn.apache.org/viewvc?rev=582643&view=rev
Log:
Minor javadoc updates only.
Modified:
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnection.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAware.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBindingListener.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationMessager.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationRequestParameterProvider.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationTimeoutableAspect.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationUtils.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationAdvice.java
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationInfo.java
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnection.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnection.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnection.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnection.java Sun Oct 7 09:33:05 2007
@@ -37,6 +37,9 @@
/**
* Get the real underlying Connection object.
+ * <p>
+ * If this object is not currently connected, then null will be returned. Note that
+ * a call to any proxied method that needs a connection will then allocate one.
*/
public Connection getConnection();
}
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/DisconnectableConnectionFactory.java Sun Oct 7 09:33:05 2007
@@ -30,7 +30,7 @@
import java.util.Map;
/**
- * Proxy connections to being able to handle disconnection.
+ * Create proxy connections able to handle disconnection of the underlying real connection.
*
* @see org.apache.myfaces.orchestra.connectionManager.DisconnectableConnection
*/
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAspects.java Sun Oct 7 09:33:05 2007
@@ -26,7 +26,7 @@
* <p>
* Aspects are a way of extending the functionality of a class without modifying it;
* it acts something like the "decorator" pattern, but with many different decorator
- * classes being supported at one.
+ * classes being supported at once.
* <p>
* In the simplest form, an Aspect can be attached to a Conversation simply as a "marker"
* to indicate whether the conversation should be treated in a certain way or not.
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAware.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAware.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAware.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationAware.java Sun Oct 7 09:33:05 2007
@@ -20,12 +20,18 @@
package org.apache.myfaces.orchestra.conversation;
/**
- * Beans implementing this interface will get the conversation object set
+ * Beans implementing this interface will get the conversation object
+ * passed to them when they are created.
+ * <p>
+ * The callback occurs just after the constructor is run, but before
+ * the dependency-injection framework "init" method (if any).
+ *
+ * @see ConversationBindingListener
*/
public interface ConversationAware
{
/**
- * the conversation the bean implementing this interface belongs to
+ * The conversation the bean implementing this interface belongs to.
*/
public void setConversation(Conversation conversation);
}
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBindingListener.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBindingListener.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBindingListener.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationBindingListener.java Sun Oct 7 09:33:05 2007
@@ -20,17 +20,21 @@
package org.apache.myfaces.orchestra.conversation;
/**
- * all beans implementing this listener will get informed if a conversation ends
+ * Beans implementing this listener interface will get informed when
+ * they are added to a conversation or removed from a conversation.
+ * <p>
+ * Note that when a conversation ends, the valueUnbound method is
+ * invoked on each bean in the conversation.
*/
public interface ConversationBindingListener
{
/**
- * the bean has been added to a conversation
+ * The bean has been added to the conversation.
*/
public void valueBound(ConversationBindingEvent event);
/**
- * the bean has been removed from the conversation
+ * The bean has been removed from the conversation.
*/
public void valueUnbound(ConversationBindingEvent event);
}
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java Sun Oct 7 09:33:05 2007
@@ -36,8 +36,10 @@
import org.apache.myfaces.shared_orchestra.util.ClassUtils;
/**
- * The manager will deal with the various contexts in the current session.
- * A new context will be created if the current window has none associated.
+ * Deals with the various conversation contexts in the current session.
+ * <p>
+ * A new conversation context will be created if the servlet request did
+ * not specify an existing conversation context id.
* <p>
* At the current time, this object does not serialize well. Any attempt to serialize
* this object (including any serialization of the user session) will just cause it
@@ -86,10 +88,10 @@
/**
* Get the conversation manager.
- *
+ * <p>
* When create is true, an instance is always returned; one is
* created if none currently exists for the current user session.
- * .
+ * <p>
* When create is false, null is returned if no instance yet
* exists for the current user session.
*/
@@ -179,7 +181,7 @@
}
/**
- * Ends all conversations within the current context, the context itself will remain active
+ * Ends all conversations within the current context; the context itself will remain active.
*/
public void clearCurrentConversationContext()
{
@@ -368,6 +370,16 @@
return cm;
}
+ /**
+ * Check the timeout for each conversation context, and all conversations
+ * within those contexts.
+ * <p>
+ * If any conversation has not been accessed within its timeout period
+ * then clear the context.
+ * <p>
+ * Invoke the checkTimeout method on each context so that any conversation
+ * that has not been accessed within its timeout is invalidated.
+ */
protected void checkTimeouts()
{
Map.Entry[] contexts;
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationMessager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationMessager.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationMessager.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationMessager.java Sun Oct 7 09:33:05 2007
@@ -25,7 +25,7 @@
* These problems can be due either to incorrect webapp development (incorrect use of Orchestra tags)
* or by something like a session timing out. In any case, when these problems happen they affect the
* user so need to be reported to the user in some way. However different apps may want to report
- * problems in different ways; the concrete ConversationManager object used is therefore configurable.
+ * problems in different ways; the concrete ConversationMessager object used is therefore configurable.
* <p>
* All methods on this class must be implemented in a thread-safe manner.
* <p>
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationRequestParameterProvider.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationRequestParameterProvider.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationRequestParameterProvider.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationRequestParameterProvider.java Sun Oct 7 09:33:05 2007
@@ -24,12 +24,11 @@
/**
* Adds the required fields (conversationContext) to the request parameters.
* <p>
- * This ensures that when the current user has more than one conversationContext
- * active then every URL in the generated page contains the current
- * conversation context id as a query parameter. This is used to ensure that
- * when the next request is submitted to the server the correct ConversationContext
- * is used (ie the set of Conversation objects that are associated with this
- * particular window).
+ * This ensures that every URL in the generated page contains the current
+ * conversation context id as a query parameter. When the request is submitted to the
+ * server this query parameter is then used to select the correct ConversationContext
+ * instance from the user session (ie the set of Conversation objects that are associated
+ * with this particular window).
*/
public class ConversationRequestParameterProvider implements RequestParameterProvider
{
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationTimeoutableAspect.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationTimeoutableAspect.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationTimeoutableAspect.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationTimeoutableAspect.java Sun Oct 7 09:33:05 2007
@@ -19,7 +19,8 @@
package org.apache.myfaces.orchestra.conversation;
/**
- * A conversation aspect which allows the conversation to autmatically end after a given timeout
+ * A conversation aspect which allows the conversation to automatically end after
+ * a given period of inactivity.
*/
public class ConversationTimeoutableAspect extends ConversationAspect
{
@@ -32,7 +33,7 @@
}
/**
- * Get the timeout ins ms after which this conversatino will be invalidated.
+ * Get the timeout in msecs after which this conversation will be invalidated.
*
* @see #setTimeout
*/
@@ -42,9 +43,9 @@
}
/**
- * Set the timeout in ms after which this conversatino will be invalidated.
- * <br />
- * A value of -1 means no timeout checking
+ * Set the timeout in msecs after which this conversation will be invalidated.
+ * <p>
+ * A value of -1 means no timeout checking.
*/
public void setTimeout(long timeout)
{
@@ -52,7 +53,7 @@
}
/**
- * check if this conversation reached the timeout period
+ * Check if this conversation reached the timeout period.
*/
public boolean isTimeoutReached()
{
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationUtils.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationUtils.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationUtils.java Sun Oct 7 09:33:05 2007
@@ -37,10 +37,12 @@
}
/**
- * <p>This will end and restart the given conversation</p>
- * <p>In contrast to {@link Conversation#invalidateAndRestart()} this
- * method returns a new instance of the "controller bean" for the given conversation</p>
- * <p>The "controller bean" is the one you configured in your spring config</p>
+ * End and restart the given conversation.
+ * <p>
+ * In contrast to {@link Conversation#invalidateAndRestart()} this
+ * method returns a new instance of the "controller bean" for the given conversation.
+ * <p>
+ * The "controller bean" is the one you configured in your dependency injection framework.
*/
public static Object invalidateAndRestart(Conversation conversation)
{
@@ -52,9 +54,10 @@
}
/**
- * <p>This will end and restart the current conversation</p>
- * <p>In contrast to {@link #invalidateAndRestart(Conversation)} this
- * method returns a new instance of the "current bean".</p>
+ * End and restart the current conversation.
+ * <p>
+ * In contrast to {@link #invalidateAndRestart(Conversation)} this
+ * method returns a new instance of the "current bean".
*/
public static Object invalidateAndRestartCurrent()
{
@@ -67,9 +70,10 @@
}
/**
- * <p>if no conversation with name <code>conversationName</code> is active a redirect to
- * <code>redirectViewId</code> will be issued.</p>
- * <p>If <code>redirectViewId</code> starts with an slash ('/') the context path will be added</p>
+ * If no conversation with name <code>conversationName</code> is active a redirect to
+ * <code>redirectViewId</code> will be issued.
+ * <p>
+ * If <code>redirectViewId</code> starts with an slash ('/') the context path will be added.
*/
public static void ensureConversationRedirect(String conversationName, String redirectViewId)
{
@@ -87,7 +91,7 @@
}
/**
- * invalidates a conversation if it exists
+ * Invalidates a conversation if it exists.
*/
public static void invalidateIfExists(String name)
{
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java Sun Oct 7 09:33:05 2007
@@ -25,7 +25,11 @@
import java.util.Map;
/**
- * The ConversationWiperThread will trigger the conversation timeout check
+ * The ConversationWiperThread will trigger the conversation timeout check.
+ * <p>
+ * This is typically started from a servlet session listener when the webapp starts.
+ *
+ * @see org.apache.myfaces.orchestra.servlet.ConversationManagerSessionListener.
*/
public class ConversationWiperThread extends Thread
{
@@ -35,6 +39,12 @@
private Map conversationManagers = new HashMap();
+ /**
+ * Constructor.
+ *
+ * @param checkTime is interval in milliseconds between scans of the existing
+ * ConversationManagers to look for timeouts.
+ */
public ConversationWiperThread(long checkTime)
{
this.checkTime = checkTime;
@@ -44,8 +54,10 @@
}
/**
- * This will add a ConversationManager to check. If there is already a ConversationManager associated
- * to the given <code>id</code>, the old ConversationManager will be replaces.
+ * Add a ConversationManager to check.
+ * <p>
+ * If there is already a ConversationManager associated with the given
+ * <code>id</code>, the old ConversationManager will be replaced.
*/
public void addConversationManager(String id, ConversationManager conversationManager)
{
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationAdvice.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationAdvice.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationAdvice.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationAdvice.java Sun Oct 7 09:33:05 2007
@@ -23,9 +23,9 @@
import org.aopalliance.intercept.MethodInvocation;
/**
- * <p>An advice which will be added to all conversation scoped beans.</p>
+ * An advice which is added to all conversation scoped beans.
*
- * <p>It will:
+ * <p>It does the following:
* <ul>
* <li>Maintain the {@link Conversation#getCurrentInstance()}</li>
* <li>End the conversation if it has been invalidated</li>
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationInfo.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationInfo.java?rev=582643&r1=582642&r2=582643&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationInfo.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/CurrentConversationInfo.java Sun Oct 7 09:33:05 2007
@@ -19,7 +19,7 @@
package org.apache.myfaces.orchestra.conversation;
/**
- * holds various infos about the current conversation
+ * Holds various info about the current conversation.
*/
public class CurrentConversationInfo
{
@@ -33,7 +33,7 @@
}
/**
- * the conversation the bean is associated with
+ * The conversation the bean is associated with.
*/
public Conversation getConversation()
{
@@ -41,7 +41,7 @@
}
/**
- * the bean name
+ * The bean name.
*/
public String getBeanName()
{