Author: rajith
Date: Fri Jun 15 17:21:01 2012
New Revision: 1350703
URL: http://svn.apache.org/viewvc?rev=1350703&view=rev
Log:
QPID-4027 Added constants FOREVER, IMMEDIATE, SECOND and MINUTE.
Modified:
qpid/branches/address-refactor2/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/Receiver.java
Modified:
qpid/branches/address-refactor2/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/Receiver.java
URL:
http://svn.apache.org/viewvc/qpid/branches/address-refactor2/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/Receiver.java?rev=1350703&r1=1350702&r2=1350703&view=diff
==============================================================================
---
qpid/branches/address-refactor2/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/Receiver.java
(original)
+++
qpid/branches/address-refactor2/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/Receiver.java
Fri Jun 15 17:21:01 2012
@@ -23,6 +23,26 @@ package org.apache.qpid.messaging;
public interface Receiver
{
/**
+ * If passed as timeout, it will block indefinitely until a message
arrives.
+ */
+ public static long FOREVER = 0;
+
+ /**
+ * If passed as timeout, it will return immediately.
+ */
+ public static long IMMEDIATE = 0;
+
+ /**
+ * If passed as timeout, it will wait a second until a message arrives.
+ */
+ public static long SECOND = 1000;
+
+ /**
+ * If passed as timeout, it will wait a minute until a message arrives.
+ */
+ public static long MINUTE = 60000;
+
+ /**
* Retrieves a message from this receivers local queue, or waits for upto
the specified timeout for a message to become available.
* A timeout of zero never expires, and the call blocks indefinitely until
a message arrives.
* @param timeout Timeout in milliseconds.
@@ -46,6 +66,7 @@ public interface Receiver
/**
* Returns the capacity of this receiver
+ *
* @return capacity
*/
public int getCapacity() throws MessagingException;
@@ -70,7 +91,7 @@ public interface Receiver
/**
* Returns true if the receiver was closed by a call to close()
*/
- public boolean isClosed() throws MessagingException;
+ public boolean isClosed();
/**
* Returns the name that uniquely identifies this receiver within the
given session.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]