You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ar...@apache.org on 2007/09/18 11:27:49 UTC

svn commit: r576799 - in /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client: DtxSession.java Session.java impl/ClientSession.java

Author: arnaudsimon
Date: Tue Sep 18 02:27:48 2007
New Revision: 576799

URL: http://svn.apache.org/viewvc?rev=576799&view=rev
Log:
added support querying an exchange and implemented dtx Session   

Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/DtxSession.java
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/Session.java
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/impl/ClientSession.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/DtxSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/DtxSession.java?rev=576799&r1=576798&r2=576799&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/DtxSession.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/DtxSession.java Tue Sep 18 02:27:48 2007
@@ -45,6 +45,7 @@
      *
      * @param xid     Specifies the xid of the transaction branch to be started.
      * @param options Possible options are: {@link Option#JOIN} and {@link Option#RESUME}.
+     * @return Confirms to the client that the transaction branch is started or specify the error condition.
      */
     public Future<DtxDemarcationStartResult> dtxDemarcationStart(String xid, Option... options);
 
@@ -62,6 +63,7 @@
      *
      * @param xid     Specifies the xid of the transaction branch to be ended.
      * @param options Available options are: {@link Option#FAIL} and {@link Option#SUSPEND}.
+     * @return Confirms to the client that the transaction branch is ended or specify the error condition.
      */
     public Future<DtxDemarcationEndResult> dtxDemarcationEnd(String xid, Option... options);
 
@@ -75,6 +77,7 @@
      *
      * @param xid     Specifies the xid of the transaction branch to be committed.
      * @param options Available option is: {@link Option#ONE_PHASE}
+     * @return Confirms to the client that the transaction branch is committed or specify the error condition.
      */
     public Future<DtxCoordinationCommitResult> dtxCoordinationCommit(String xid, Option... options);
 
@@ -114,16 +117,17 @@
     /**
      * This method is called to obtain a list of transaction branches that are in a prepared or
      * heuristically completed state.
-     *
+     * Todo The options ahould be removed once the xml is updated
      * @return a array of xids to be recovered.
      */
-    public Future<DtxCoordinationRecoverResult> dtxCoordinationRecover();
+    public Future<DtxCoordinationRecoverResult> dtxCoordinationRecover(Option... options);
 
     /**
      * This method rolls back the work associated with xid. Any produced messages are discarded and
      * any consumed messages are re-enqueued.
      *
      * @param xid Specifies the xid of the transaction branch that can be rolled back.
+     * @return Confirms to the client that the transaction branch is rolled back or specify the error condition.
      */
     public Future<DtxCoordinationRollbackResult> dtxCoordinationRollback(String xid);
 

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/Session.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/Session.java?rev=576799&r1=576798&r2=576799&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/Session.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/Session.java Tue Sep 18 02:27:48 2007
@@ -22,9 +22,7 @@
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import org.apache.qpidity.transport.Option;
-import org.apache.qpidity.transport.RangeSet;
-import org.apache.qpidity.transport.Struct;
+import org.apache.qpidity.transport.*;
 import org.apache.qpidity.api.Message;
 
 /**
@@ -151,11 +149,11 @@
 
     /**
      * Declare the beginning of a message transfer operation. This operation must
-     * be followed by {@link Session#headers} then followed by any number of {@link Session#data}.
+     * be followed by {@link Session#header} then followed by any number of {@link Session#data}.
      * The transfer is ended by {@link Session#endData}.
      * <p> This way of transferring messages is useful when streaming large messages
      * <p> In the interval [messageTransfer endData] any attempt to call a method other than
-     * {@link Session#headers}, {@link Session#endData} ore {@link Session#sessionClose}
+     * {@link Session#header}, {@link Session#endData} ore {@link Session#sessionClose}
      * will result in an exception being thrown.
      *
      * @param destination The exchange the message is being sent.
@@ -181,10 +179,10 @@
     /**
      * Add a set of headers the following headers to the message being sent.
      *
-     * @param headers Are either <code>{@link org.apache.qpidity.DeliveryProperties}</code>
-     *                or <code>{@link org.apache.qpidity.MessageProperties}</code>
-     * @see org.apache.qpidity.DeliveryProperties
-     * @see org.apache.qpidity.MessageProperties
+     * @param headers Are either <code>{@link org.apache.qpidity.transport.DeliveryProperties}</code>
+     *                or <code>{@link org.apache.qpidity.transport.MessageProperties}</code>
+     * @see org.apache.qpidity.transport.DeliveryProperties
+     * @see org.apache.qpidity.transport.MessageProperties
      */
     public void header(Struct... headers);
 
@@ -595,6 +593,16 @@
      * @see Option
      */
     public void exchangeDelete(String exchangeName, Option... options);
+
+
+    /**
+     * This method is used to request information on a particular exchange.
+     *
+     * @param exchangeName The name of the exchange for which information is requested. If not specified explicitly
+     *                     the default exchange is implied.
+     * @result Information on the specified exchange.
+     */
+    public Future<ExchangeQueryResult> exchangeQuery(String exchangeName);
 
     /**
      * If the session receives a sessionClosed with an error code it

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/impl/ClientSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/impl/ClientSession.java?rev=576799&r1=576798&r2=576799&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/impl/ClientSession.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpidity/client/impl/ClientSession.java Tue Sep 18 02:27:48 2007
@@ -16,7 +16,7 @@
 /**
  * Implements a Qpid Sesion. 
  */
-public class ClientSession extends org.apache.qpidity.transport.Session implements org.apache.qpidity.client.Session
+public class ClientSession extends org.apache.qpidity.transport.Session implements  org.apache.qpidity.client.DtxSession
 {
     private Map<String,MessagePartListener> _messageListeners = new HashMap<String,MessagePartListener>();
     private ExceptionListener _exceptionListner;