From 082815b1634d67ae0bbf356025b9e451da0dbdcc Mon Sep 17 00:00:00 2001 From: Arnaud Simon Date: Thu, 16 Aug 2007 08:16:19 +0000 Subject: updated javadoc git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566538 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/qpidity/client/Session.java | 349 +++++++++++++-------- 1 file changed, 218 insertions(+), 131 deletions(-) (limited to 'java/client') diff --git a/java/client/src/main/java/org/apache/qpidity/client/Session.java b/java/client/src/main/java/org/apache/qpidity/client/Session.java index dea6a01da6..1de6ce7aaa 100644 --- a/java/client/src/main/java/org/apache/qpidity/client/Session.java +++ b/java/client/src/main/java/org/apache/qpidity/client/Session.java @@ -31,11 +31,16 @@ import org.apache.qpidity.api.Message; *

A session is associated with a connection. * When created a Session is not attached with an underlying channel. * Session is single threaded

+ *

+ * All the Session commands are asynchronous, synchronous invocation is achieved through invoking the sync method. + * That is to say that command1 will be synchronously invoked using the following sequence: + *

*/ public interface Session { - public static final short ACQUIRE_ANY_AVAILABLE_MESSAGE = 0; - public static final short ACQUIRE_MESSAGES_IF_ALL_ARE_AVAILABLE = 0; public static final short TRANSFER_ACQUIRE_MODE_NO_ACQUIRE = 0; public static final short TRANSFER_ACQUIRE_MODE_PRE_ACQUIRE = 1; public static final short TRANSFER_CONFIRM_MODE_REQUIRED = 1; @@ -44,17 +49,21 @@ public interface Session public static final short MESSAGE_FLOW_MODE_WINDOW = 1; public static final short MESSAGE_FLOW_UNIT_MESSAGE = 0; public static final short MESSAGE_FLOW_UNIT_BYTE = 1; + public static final short MESSAGE_REJECT_CODE_GENERIC = 0; + public static final short MESSAGE_REJECT_CODE_IMMEDIATE_DELIVERY_FAILED = 1; + public static final short MESSAGE_ACQUIRE_ANY_AVAILABLE_MESSAGE = 0; + public static final short MESSAGE_ACQUIRE_MESSAGES_IF_ALL_ARE_AVAILABLE = 1; //------------------------------------------------------ // Session housekeeping methods //------------------------------------------------------ - + /** * Sync method will block until all outstanding commands * are executed. */ public void sync(); - + /** * Close this session and any associated resources. */ @@ -73,93 +82,109 @@ public interface Session //------------------------------------------------------ /** * Transfer the given message to a specified exchange. - * + *

*

This is a convinience method for providing a complete message * using a single method which internaly is mapped to messageTransfer(), headers() followed - * by data() and an endData(). + * by data() and an endData(). * This method should only be used by small messages

* * @param destination The exchange the message is being sent. * @param msg The Message to be sent - * @param confirmMode