You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2015/01/21 01:07:49 UTC

qpid-jms git commit: add some Javadoc for the stop method.

Repository: qpid-jms
Updated Branches:
  refs/heads/master 89ca529eb -> 02c5377b2


add some Javadoc for the stop method. 

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/02c5377b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/02c5377b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/02c5377b

Branch: refs/heads/master
Commit: 02c5377b25f5eeaf226d9b9cf8c2c3aaecd8b99f
Parents: 89ca529
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Jan 20 19:06:50 2015 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Jan 20 19:06:50 2015 -0500

----------------------------------------------------------------------
 .../org/apache/qpid/jms/provider/Provider.java  | 26 +++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/02c5377b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/Provider.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/Provider.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/Provider.java
index 3964208..f13578f 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/Provider.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/Provider.java
@@ -123,7 +123,31 @@ public interface Provider {
      */
     void start(JmsResource resource, AsyncResult request) throws IOException, JMSException;
 
-    //TODO: javadoc. Possibly call 'pause' instead?
+    /**
+     * Stops (pauses) the Provider version of the given JmsResource, the resource would then
+     * need to be started again via a call to <code>start()</code>
+     *
+     * For some JMS Resources it is necessary or advantageous to have a stopped state that
+     * cam be triggered to stop the resource generating new events or messages.
+     *
+     * An example of this would be a JMS Session which should not receive any incoming messages
+     * for any consumers until the JMS layer is in a state to handle them.  One such time would be
+     * during a transaction rollback.  A JMS Session should normally ensure that messages received
+     * in a transaction are set to be redelivered prior to any new deliveries on a transaction
+     * rollback.
+     *
+     * The provider is required to implement this method and not throw any error other than
+     * an IOException if a communication error occurs.  The stop operation is not required to
+     * have any effect on the provider resource but must not throw UnsupportedOperation etc.
+     *
+     * @param resource
+     *        The JmsResouce instance that indicates what is being stopped.
+     * @param request
+     *        The request object that should be signaled when this operation completes.
+     *
+     * @throws IOException if an error occurs or the Provider is already closed.
+     * @throws JMSException if an error occurs due to JMS violation such as already closed resource.
+     */
     void stop(JmsResource resource, AsyncResult request) throws IOException, JMSException;
 
     /**


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org