001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.mq.server.jmx;
023:
024: import java.util.Collection;
025: import java.util.List;
026:
027: /**
028: * MBean interface.
029: */
030: public interface QueueMBean extends DestinationMBean {
031: /**
032: * Get the queue name
033: *
034: * @return the queue name
035: */
036: String getQueueName();
037:
038: /**
039: * Gets the QueueDepth attribute of the BasicQueue object
040: *
041: * @return The QueueDepth value
042: * @exception Exception Description of Exception
043: */
044: int getQueueDepth() throws Exception;
045:
046: /**
047: * Gets the ScheduledMessageCount attribute of the BasicQueue object
048: *
049: * @return The ScheduledMessageCount value
050: * @exception Exception Description of Exception
051: */
052: int getScheduledMessageCount() throws Exception;
053:
054: /**
055: * Gets the InprocessMessageCount attribute of the BasicQueue object
056: *
057: * @return The ScheduledMessageCount value
058: * @exception Exception Description of Exception
059: */
060: int getInProcessMessageCount() throws Exception;
061:
062: /**
063: * Get the number of active receivers
064: *
065: * @return the number of receivers
066: */
067: int getReceiversCount();
068:
069: /**
070: * List the active receivers
071: *
072: * @return the receivers
073: */
074: List listReceivers();
075:
076: /**
077: * List the messages
078: *
079: * @return the messages
080: * @throws Exception for any error
081: */
082: List listMessages() throws Exception;
083:
084: /**
085: * List the messages matching a selector
086: *
087: * @param selector the selector
088: * @return the messages
089: * @throws Exception for any error
090: */
091: List listMessages(String selector) throws Exception;
092:
093: /**
094: * List the scheduled messages
095: *
096: * @return the messages
097: * @throws Exception for any error
098: */
099: List listScheduledMessages() throws Exception;
100:
101: /**
102: * List the scheduled messages matching a selector
103: *
104: * @param selector the selector
105: * @return the messages
106: * @throws Exception for any error
107: */
108: List listScheduledMessages(String selector) throws Exception;
109:
110: /**
111: * List the in process messages
112: *
113: * @return the messages
114: * @throws Exception for any error
115: */
116: List listInProcessMessages() throws Exception;
117:
118: /**
119: * List the in process messages matching a selector
120: *
121: * @param selector the selector
122: * @return the messages
123: * @throws Exception for any error
124: */
125: List listInProcessMessages(String selector) throws Exception;
126:
127: /**
128: * Get the number of active subscribers
129: *
130: * @return the number of subscribers
131: */
132: int getSubscribersCount();
133:
134: /**
135: * List the active subscribers
136: *
137: * @return the subscribers
138: */
139: Collection listSubscribers();
140: }
|