[hornetq-commits] JBoss hornetq SVN: r8339 - trunk/src/main/org/hornetq/core/client.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 20 09:38:09 EST 2009


Author: jmesnil
Date: 2009-11-20 09:38:08 -0500 (Fri, 20 Nov 2009)
New Revision: 8339

Modified:
   trunk/src/main/org/hornetq/core/client/ClientProducer.java
Log:
HORNETQ-186: Javadoc for Core API

* added javadoc to ClientProducer interface

Modified: trunk/src/main/org/hornetq/core/client/ClientProducer.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/ClientProducer.java	2009-11-20 14:35:17 UTC (rev 8338)
+++ trunk/src/main/org/hornetq/core/client/ClientProducer.java	2009-11-20 14:38:08 UTC (rev 8339)
@@ -9,7 +9,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  * implied.  See the License for the specific language governing
  * permissions and limitations under the License.
- */ 
+ */
 
 package org.hornetq.core.client;
 
@@ -22,22 +22,74 @@
  * @author <a href="mailto:ataylor at redhat.com">Andy Taylor</a>
  */
 public interface ClientProducer
-{        
-	SimpleString getAddress();
-	
-	void send(Message message) throws HornetQException;
-	
+{
+   /**
+    * Return the address where messages will be sent to.
+    * The address can be <code>null</code> if the ClientProducer
+    * was creating without specifying an address with {@link ClientSession#createProducer()}. 
+    * 
+    * @return the address where messages will be sent
+    */
+   SimpleString getAddress();
+
+   /**
+    * Send a message.
+    * 
+    * @param message the message to send
+    * @throws HornetQException if an exception occurs while sending the message
+    */
+   void send(Message message) throws HornetQException;
+
+   /**
+    * Send a message to the specified address instead of the ClientProducer's address.
+    * 
+    * @param address the address where the message will be sent
+    * @param message the message to send
+    * @throws HornetQException if an exception occurs while sending the message
+    */
    void send(SimpleString address, Message message) throws HornetQException;
-   
+
+   /**
+    * Send a message to the specified address instead of the ClientProducer's address.
+    * 
+    * @param address the address where the message will be sent
+    * @param message the message to send
+    * @throws HornetQException if an exception occurs while sending the message
+    */
    void send(String address, Message message) throws HornetQException;
 
+   /**
+    * Close the ClientProducer.
+    * 
+    * @throws HornetQException if an exception occurs while closing the producer
+    */
    void close() throws HornetQException;
-   
-   boolean isClosed();   
-   
+
+   /**
+    * Return whether the producer is closed or not.
+    * 
+    * @return <code>true</code> if the producer is closed, <code>false</code> else
+    */
+   boolean isClosed();
+
+   /**
+    * Return whether the producer will block when sending <em>persistent</em> messages.
+    * 
+    * @return <code>true</code> if the producer blocks when sending persistent, <code>false</code> else
+    */
    boolean isBlockOnPersistentSend();
-   
+
+   /**
+    * Return whether the producer will block when sending <em>non-persistent</em> messages.
+    * 
+    * @return <code>true</code> if the producer blocks when sending non-persistent, <code>false</code> else
+    */
    boolean isBlockOnNonPersistentSend();
-   
+
+   /**
+    * Return the producer maximum rate.
+    * 
+    * @return the producer maximum rate
+    */
    int getMaxRate();
 }



More information about the hornetq-commits mailing list