KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > mom > dest > QueueImplMBean


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2004 - 2005 ScalAgent Distributed Technologies
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  *
20  * Initial developer(s): ScalAgent Distributed Technologies
21  * Contributor(s):
22  */

23 package org.objectweb.joram.mom.dest;
24
25 public interface QueueImplMBean extends DestinationImplMBean {
26   /**
27    * Returns the period value of this queue, -1 if not set.
28    *
29    * @return the period value of this queue; -1 if not set.
30    */

31   long getPeriod();
32
33   /**
34    * Sets or unsets the period for this queue.
35    *
36    * @param period The period value to be set or -1 for unsetting previous
37    * value.
38    */

39   void setPeriod(long period);
40
41   /**
42    * Returns the threshold value of this queue, -1 if not set.
43    *
44    * @return the threshold valcdue of this queue; -1 if not set.
45    */

46   int getThreshold();
47
48   /**
49    * Sets or unsets the threshold for this queue.
50    *
51    * @param threshold The threshold value to be set or -1 for unsetting
52    * previous value.
53    */

54   void setThreshold(int threshold);
55
56   /**
57    * Returns the number of messages received since creation time.
58    *
59    * @return The number of received messages.
60    */

61   int getMessageCounter();
62
63   /**
64    * Returns the number of waiting requests in the queue.
65    *
66    * @return The number of waiting requests.
67    */

68   int getWaitingRequestCount();
69
70 // /**
71
// * Removes all request that the expiration time is expired.
72
// */
73
// void cleanWaitingRequest();
74

75   /**
76    * Returns the number of pending messages in the queue.
77    *
78    * @return The number of pending messages.
79    */

80   int getPendingMessageCount();
81
82 // /**
83
// * Removes all messages that the time-to-live is expired.
84
// */
85
// void cleanPendingMessage();
86

87   /**
88    * Returns the number of messages delivered and waiting for acknowledge.
89    *
90    * @return The number of messages delivered.
91    */

92   int getDeliveredMessageCount();
93
94   /**
95    * Returns the maximum number of message for the destination.
96    * If the limit is unset the method returns -1.
97    *
98    * @return the maximum number of message for subscription if set;
99    * -1 otherwise.
100    */

101   int getNbMaxMsg();
102
103   /**
104    * Sets the maximum number of message for the destination.
105    *
106    * @param nbMaxMsg the maximum number of message (-1 set no limit).
107    */

108   void setNbMaxMsg(int nbMaxMsg);
109 }
110
Popular Tags