[hornetq-commits] JBoss hornetq SVN: r8669 - in trunk/src/main/org/hornetq: jms/server/management and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Dec 10 12:33:46 EST 2009


Author: jmesnil
Date: 2009-12-10 12:33:45 -0500 (Thu, 10 Dec 2009)
New Revision: 8669

Modified:
   trunk/src/main/org/hornetq/core/management/AddressControl.java
   trunk/src/main/org/hornetq/core/management/QueueControl.java
   trunk/src/main/org/hornetq/jms/server/management/DestinationControl.java
   trunk/src/main/org/hornetq/jms/server/management/JMSQueueControl.java
   trunk/src/main/org/hornetq/jms/server/management/TopicControl.java
Log:
HORNETQ-186: fill in Javadocs for core API

* added javadoc for org.hornetq.jms.server.management API

Modified: trunk/src/main/org/hornetq/core/management/AddressControl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/AddressControl.java	2009-12-10 16:28:39 UTC (rev 8668)
+++ trunk/src/main/org/hornetq/core/management/AddressControl.java	2009-12-10 17:33:45 UTC (rev 8669)
@@ -38,6 +38,8 @@
    /**
     * Returns the roles  (name and permissions) associated to this address
     * using JSON serialization.
+    * <br>
+    * Java objects can be recreated from JSON serialization using {@link RoleInfo#from(String)}.
     */
    String getRolesAsJSON() throws Exception;
 

Modified: trunk/src/main/org/hornetq/core/management/QueueControl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/QueueControl.java	2009-12-10 16:28:39 UTC (rev 8668)
+++ trunk/src/main/org/hornetq/core/management/QueueControl.java	2009-12-10 17:33:45 UTC (rev 8669)
@@ -69,7 +69,6 @@
     */
    long getScheduledCount();
 
-   
    /**
     * Returns the number of consumers consuming messages from this queue.
     */
@@ -122,21 +121,27 @@
    String listScheduledMessagesAsJSON() throws Exception;
 
    /**
-     * Lists all the messages in this queue matching the specified filter.
+    * Lists all the messages in this queue matching the specified filter.
     * <br>
     * 1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
+    * <br>
+    * Using {@code null} or an empty filter will list <em>all</em> messages from this queue.
     */
    @Operation(desc = "List all the messages in the queue matching the given filter", impact = MBeanOperationInfo.INFO)
    Map<String, Object>[] listMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception;
 
    /**
     * Lists all the messages in this queue matching the specified filter using JSON serialization.
-   */
+    * <br>
+    * Using {@code null} or an empty filter will list <em>all</em> messages from this queue.
+    */
    @Operation(desc = "List all the messages in the queue matching the given filter and returns them using JSON", impact = MBeanOperationInfo.INFO)
    String listMessagesAsJSON(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception;
 
    /**
     * Counts the number of messages in this queue matching the specified filter.
+    * <br>
+    * Using {@code null} or an empty filter will count <em>all</em> messages from this queue.
     */
    @Operation(desc = "Returns the number of the messages in the queue matching the given filter", impact = MBeanOperationInfo.INFO)
    int countMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception;
@@ -228,6 +233,8 @@
 
    /**
     * Changes the priority for all the message corresponding to the specified filter to the specified priority.
+    * <br>
+    * Using {@code null} or an empty filter will change <em>all</em> messages from this queue.
     * 
     * @return the number of changed messages
     */
@@ -278,7 +285,7 @@
    void resume() throws Exception;
 
    /**
-    * Returns whether the queue is pause.
+    * Returns whether the queue is paused.
     */
    @Operation(desc = "Inspects if the queue is paused", impact = MBeanOperationInfo.INFO)
    boolean isPaused() throws Exception;

Modified: trunk/src/main/org/hornetq/jms/server/management/DestinationControl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/DestinationControl.java	2009-12-10 16:28:39 UTC (rev 8668)
+++ trunk/src/main/org/hornetq/jms/server/management/DestinationControl.java	2009-12-10 17:33:45 UTC (rev 8669)
@@ -19,27 +19,48 @@
 import org.hornetq.core.server.management.Parameter;
 
 /**
+ * A DestinationControl is used to manage a JMS Destination.
+ * 
  * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
- * 
- * @version <tt>$Revision$</tt>
- * 
  */
 public interface DestinationControl
 {
    // Attributes ----------------------------------------------------
 
+   /**
+    * Returns the name of this destination.
+    */
    String getName();
 
+   /**
+    * Returns the JNDI binding of this destination.
+    */
    String getJNDIBinding();
 
+   /**
+    * Returns the HornetQ address corresponding to this destination.
+    */
    String getAddress();
 
+   /**
+    * Returns whether this destination is temporary.
+    */
    boolean isTemporary();
 
+   /**
+    * Returns the number of messages currently in this destination.
+    */
    int getMessageCount() throws Exception;
 
    // Operations ----------------------------------------------------
 
+   /**
+    * Removed all the messages which matches the specified JMS filter from this destination.
+    * <br>
+    * Using {@code null} or an empty filter will remove <em>all</em> messages from this destination.
+    *
+    * @return the number of removed messages
+    */
    @Operation(desc = "Remove messages matching the given filter from the destination", impact = MBeanOperationInfo.ACTION)
    int removeMessages(@Parameter(name = "filter", desc = "A JMS message filter (can be empty)") String filter) throws Exception;
 

Modified: trunk/src/main/org/hornetq/jms/server/management/JMSQueueControl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/JMSQueueControl.java	2009-12-10 16:28:39 UTC (rev 8668)
+++ trunk/src/main/org/hornetq/jms/server/management/JMSQueueControl.java	2009-12-10 17:33:45 UTC (rev 8669)
@@ -21,106 +21,225 @@
 import org.hornetq.core.server.management.Parameter;
 
 /**
+ * A JMSQueueControl is used to manage a JMS queue.
+ * 
  * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
- * 
- * @version <tt>$Revision$</tt>
- * 
  */
 public interface JMSQueueControl extends DestinationControl
 {
    // Attributes ----------------------------------------------------
 
-   String getName();
-
+   /**
+    * Returns the expiry address associated to this queue.
+    */
    String getExpiryAddress();
 
+   /**
+    * Sets the expiry address associated to this queue to the specified expiryAddress.
+    */
    void setExpiryAddress(@Parameter(name = "expiryAddress", desc = "Expiry address of the queue") String expiryAddress) throws Exception;
 
+   /**
+    * Returns the dead-letter address associated to this queue.
+    */
    String getDeadLetterAddress();
 
+   /**
+    * Sets the dead-letter address associated to this queue to the specified deadLetterAddress.
+    */
    void setDeadLetterAddress(@Parameter(name = "deadLetterAddress", desc = "Dead-letter address of the queue") String deadLetterAddress) throws Exception;
 
+   /**
+    * Returns the number of messages added to this queue since it was created.
+    */
    int getMessagesAdded();
 
-   boolean isTemporary();
-
-   boolean isDurable();
-
-   int getMessageCount();
-
+   /**
+    * Returns the number of scheduled messages in this queue.
+    */
    long getScheduledCount();
 
+   /**
+    * Returns the number of consumers consuming messages from this queue.
+    */
    int getConsumerCount();
 
+   /**
+    * Returns the number of messages that this queue is currently delivering to its consumers.
+    */
    int getDeliveringCount();
 
    // Operations ----------------------------------------------------
 
+   /**
+    * Lists all the JMS messages in this queue matching the specified filter.
+    * <br>
+    * 1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
+    * <br>
+    * Using {@code null} or an empty filter will list <em>all</em> messages from this queue.
+    */
    @Operation(desc = "List all messages in the queue which matches the filter", impact = MBeanOperationInfo.INFO)
    Map<String, Object>[] listMessages(@Parameter(name = "filter", desc = "A JMS Message filter") String filter) throws Exception;
 
+   /**
+    * Lists all the JMS messages in this queue matching the specified filter using JSON serialization.
+    * <br>
+    * Using {@code null} or an empty filter will list <em>all</em> messages from this queue.
+    */
    @Operation(desc = "List all messages in the queue which matches the filter and return them using JSON", impact = MBeanOperationInfo.INFO)
    String listMessagesAsJSON(@Parameter(name = "filter", desc = "A JMS Message filter (can be empty)") String filter) throws Exception;
 
+   /**
+    * Counts the number of messages in this queue matching the specified filter.
+    * <br>
+    * Using {@code null} or an empty filter will count <em>all</em> messages from this queue.
+    */
    @Operation(desc = "Returns the number of the messages in the queue matching the given filter", impact = MBeanOperationInfo.INFO)
    int countMessages(@Parameter(name = "filter", desc = "A JMS message filter (can be empty)") String filter) throws Exception;
 
+   /**
+    * Removes the message corresponding to the specified message ID.
+    *
+    * @return {@code true}Êif the message was removed, {@code false} else
+    */
    @Operation(desc = "Remove the message corresponding to the given messageID", impact = MBeanOperationInfo.ACTION)
    boolean removeMessage(@Parameter(name = "messageID", desc = "A message ID") String messageID) throws Exception;
 
+   /**
+    * Removes all the message corresponding to the specified filter.
+    * <br>
+    * Using {@code null} or an empty filter will remove <em>all</em> messages from this queue.
+    * 
+    * @return the number of removed messages
+    */
    @Operation(desc = "Remove the messages corresponding to the given filter (and returns the number of removed messages)", impact = MBeanOperationInfo.ACTION)
    int removeMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception;
 
+   /**
+    * Expires all the message corresponding to the specified filter.
+    * <br>
+    * Using {@code null} or an empty filter will expire <em>all</em> messages from this queue.
+    * 
+    * @return the number of expired messages
+    */
    @Operation(desc = "Expire the messages corresponding to the given filter (and returns the number of expired messages)", impact = MBeanOperationInfo.ACTION)
    int expireMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception;
 
+   /**
+    * Expires the message corresponding to the specified message ID.
+    *
+    * @return {@code true}Êif the message was expired, {@code false} else
+    */
    @Operation(desc = "Expire the message corresponding to the given messageID", impact = MBeanOperationInfo.ACTION)
    boolean expireMessage(@Parameter(name = "messageID", desc = "A message ID") String messageID) throws Exception;
 
-   @Operation(desc = "Send the message corresponding to the given messageID to the queue's Dead Letter Queue", impact = MBeanOperationInfo.ACTION)
+   /**
+    * Sends the message corresponding to the specified message ID to this queue's dead letter address.
+    *
+    * @return {@code true}Êif the message was sent to the dead letter address, {@code false} else
+    */
+   @Operation(desc = "Send the message corresponding to the given messageID to this queue's Dead Letter Address", impact = MBeanOperationInfo.ACTION)
    boolean sendMessageToDeadLetterAddress(@Parameter(name = "messageID", desc = "A message ID") String messageID) throws Exception;
 
+   /**
+    * Sends all the message corresponding to the specified filter to this queue's dead letter address.
+    * <br>
+    * Using {@code null} or an empty filter will send <em>all</em> messages from this queue.
+    * 
+    * @return the number of sent messages
+    */
    @Operation(desc = "Send the messages corresponding to the given filter to this queue's Dead Letter Address", impact = MBeanOperationInfo.ACTION)
    int sendMessagesToDeadLetterAddress(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filterStr) throws Exception;
 
+   /**
+    * Changes the message's priority corresponding to the specified message ID to the specified priority.
+    * 
+    * @param newPriority between 0 and 9 inclusive.
+    *
+    * @return {@code true}Êif the message priority was changed
+    */
    @Operation(desc = "Change the priority of the message corresponding to the given messageID", impact = MBeanOperationInfo.ACTION)
    boolean changeMessagePriority(@Parameter(name = "messageID", desc = "A message ID") String messageID,
                                  @Parameter(name = "newPriority", desc = "the new priority (between 0 and 9)") int newPriority) throws Exception;
 
+   /**
+    * Changes the priority for all the message corresponding to the specified filter to the specified priority.
+    * <br>
+    * Using {@code null} or an empty filter will change <em>all</em> messages from this queue.
+    * 
+    * @return the number of changed messages
+    */
    @Operation(desc = "Change the priority of the messages corresponding to the given filter", impact = MBeanOperationInfo.ACTION)
    int changeMessagesPriority(@Parameter(name = "filter", desc = "A message filter") String filter,
                               @Parameter(name = "newPriority", desc = "the new priority (between 0 and 9)") int newPriority) throws Exception;
 
+   /**
+    * Moves the message corresponding to the specified message ID to the specified other queue.
+    *
+    * @return {@code true}Êif the message was moved, {@code false} else
+    */
    @Operation(desc = "Move the message corresponding to the given messageID to another queue", impact = MBeanOperationInfo.ACTION)
    boolean moveMessage(@Parameter(name = "messageID", desc = "A message ID") String messageID,
                        @Parameter(name = "otherQueueName", desc = "The name of the queue to move the message to") String otherQueueName) throws Exception;
 
+   /**
+    * Moves all the message corresponding to the specified filter  to the specified other queue.
+    * <br>
+    * Using {@code null} or an empty filter will move <em>all</em> messages from this queue.
+    * 
+    * @return the number of moved messages
+    */
    @Operation(desc = "Move the messages corresponding to the given filter (and returns the number of moved messages)", impact = MBeanOperationInfo.ACTION)
    int moveMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter,
                     @Parameter(name = "otherQueueName", desc = "The name of the queue to move the messages to") String otherQueueName) throws Exception;
 
+   /**
+    * Lists the message counter for this queue.
+    */
    @Operation(desc = "List the message counters", impact = MBeanOperationInfo.INFO)
    String listMessageCounter() throws Exception;
 
+   /**
+    * Resets the message counter for this queue.
+    */
    @Operation(desc = "Reset the message counters", impact = MBeanOperationInfo.INFO)
    void resetMessageCounter() throws Exception;
 
+
+   /**
+    * Lists the message counter for this queue as a HTML table.
+    */
    @Operation(desc = "List the message counters as HTML", impact = MBeanOperationInfo.INFO)
    String listMessageCounterAsHTML() throws Exception;
 
+   /**
+    * Lists the message counter history for this queue.
+    */
    @Operation(desc = "List the message counters history", impact = MBeanOperationInfo.INFO)
    String listMessageCounterHistory() throws Exception;
 
+   /**
+    * Lists the message counter history for this queue as a HTML table.
+    */
    @Operation(desc = "List the message counters history as HTML", impact = MBeanOperationInfo.INFO)
    String listMessageCounterHistoryAsHTML() throws Exception;
 
-   @Operation(desc = "Pauses the queue.", impact = MBeanOperationInfo.INFO)
+   /**
+    * Pauses the queue. Messages are no longer delivered to its consumers.
+    */
+   @Operation(desc = "Pause the queue.", impact = MBeanOperationInfo.ACTION)
    void pause() throws Exception;
 
+   /**
+    * Returns whether the queue is paused.
+    */
    @Operation(desc = "Returns true if the queue is paused.", impact = MBeanOperationInfo.INFO)
    boolean isPaused() throws Exception;
 
-   @Operation(desc = "Resumes the queue.", impact = MBeanOperationInfo.INFO)
+   /**
+    * Resumes the queue. Messages are again delivered to its consumers.
+    */
+   @Operation(desc = "Resume the queue.", impact = MBeanOperationInfo.ACTION)
    void resume() throws Exception;
 
 }

Modified: trunk/src/main/org/hornetq/jms/server/management/TopicControl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/TopicControl.java	2009-12-10 16:28:39 UTC (rev 8668)
+++ trunk/src/main/org/hornetq/jms/server/management/TopicControl.java	2009-12-10 17:33:45 UTC (rev 8669)
@@ -21,60 +21,117 @@
 import org.hornetq.core.server.management.Parameter;
 
 /**
+ * A TopicControl is used to manage a JMS Topic.
+ * 
  * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
- * 
- * @version <tt>$Revision$</tt>
- * 
  */
 public interface TopicControl extends DestinationControl
 {
    // Attributes ----------------------------------------------------
 
+   /**
+    * Returns the number of (durable and non-durable) subscribers for this topic.
+    */
    int getSubscriptionCount();
 
+   /**
+    * Returns the number of <em>durable</em> subscribers for this topic.
+    */
    int getDurableSubscriptionCount();
 
+   /**
+    * Returns the number of <em>non-durable</em> subscribers for this topic.
+    */
    int getNonDurableSubscriptionCount();
 
+   /**
+    * Returns the number of messages for all <em>durable</em> subscribers for this topic.
+    */
    int getDurableMessageCount();
 
+   /**
+    * Returns the number of messages for all <em>non-durable</em> subscribers for this topic.
+    */
    int getNonDurableMessageCount();
 
    // Operations ----------------------------------------------------
 
+   /**
+    * Lists all the subscriptions for this topic (both durable and non-durable).
+    */
    @Operation(desc = "List all subscriptions")
    Object[] listAllSubscriptions() throws Exception;
 
+   /**
+    * Lists all the subscriptions for this topic (both durable and non-durable) using JSON serialization.
+    * <br>
+    * Java objects can be recreated from JSON serialization using {@link SubscriptionInfo#from(String)}.
+    */
    @Operation(desc = "List all subscriptions")
    String listAllSubscriptionsAsJSON() throws Exception;
 
+   /**
+    * Lists all the <em>durable</em> subscriptions for this topic.
+    */
    @Operation(desc = "List only the durable subscriptions")
    Object[] listDurableSubscriptions() throws Exception;
 
+   /**
+    * Lists all the <em>durable</em> subscriptions  using JSON serialization.
+    * <br>
+    * Java objects can be recreated from JSON serialization using {@link SubscriptionInfo#from(String)}.
+    */
    @Operation(desc = "List only the durable subscriptions")
    String listDurableSubscriptionsAsJSON() throws Exception;
 
+   /**
+    * Lists all the <em>non-durable</em> subscriptions for this topic.
+    */
    @Operation(desc = "List only the non durable subscriptions")
    Object[] listNonDurableSubscriptions() throws Exception;
 
+   /**
+    * Lists all the <em>non-durable</em> subscriptions  using JSON serialization.
+    * <br>
+    * Java objects can be recreated from JSON serialization using {@link SubscriptionInfo#from(String)}.
+    */
    @Operation(desc = "List only the non durable subscriptions")
    String listNonDurableSubscriptionsAsJSON() throws Exception;
 
+   /**
+    * Lists all the messages in this queue matching the specified queue representing the subscription.
+    * <br>
+    * 1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
+    */
    @Operation(desc = "List all the message for the given subscription")
    public Map<String, Object>[] listMessagesForSubscription(@Parameter(name = "queueName", desc = "the name of the queue representing a subscription") String queueName) throws Exception;
 
+   /**
+    * Lists all the messages in this queue matching the specified queue representing the subscription using JSON serialization.
+    */
    @Operation(desc = "List all the message for the given subscription")
    public String listMessagesForSubscriptionAsJSON(@Parameter(name = "queueName", desc = "the name of the queue representing a subscription") String queueName) throws Exception;
 
+   /**
+    * Counts the number of messages in the subscription specified by the specified client ID and subscription name. Only messages matching the filter will be counted.
+    * <br>
+    * Using {@code null} or an empty filter will count <em>all</em> messages from this queue.
+    */
    @Operation(desc = "Count the number of messages matching the filter for the given subscription")
    public int countMessagesForSubscription(@Parameter(name = "clientID", desc = "the client ID") String clientID,
                                            @Parameter(name = "subscriptionName", desc = "the name of the durable subscription") String subscriptionName,
                                            @Parameter(name = "filter", desc = "a JMS filter (can be empty)") String filter) throws Exception;
 
+   /**
+    * Drops the subscription specified by the specified client ID and subscription name.
+    */
    @Operation(desc = "Drop a durable subscription", impact = MBeanOperationInfo.ACTION)
    void dropDurableSubscription(@Parameter(name = "clientID", desc = "the client ID") String clientID,
                                 @Parameter(name = "subscriptionName", desc = "the name of the durable subscription") String subscriptionName) throws Exception;
 
+   /**
+    * Drops all subscriptions.
+    */
    @Operation(desc = "Drop all subscriptions from this topic", impact = MBeanOperationInfo.ACTION)
    void dropAllSubscriptions() throws Exception;
 }



More information about the hornetq-commits mailing list