KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > mom > proxies > ProxyImplMBean


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.proxies;
24
25 import javax.management.openmbean.*;
26
27 public interface ProxyImplMBean {
28   /**
29    * Returns the period value of this queue, -1 if not set.
30    *
31    * @return the period value of this queue; -1 if not set.
32    */

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

41   void setPeriod(long period);
42
43   /**
44    * Returns the list of subscriptions for this user. Each subscription is
45    * identified by its unique 'symbolic' name.
46    *
47    * @return The list of subscriptions for this user.
48    */

49   String JavaDoc[] getSubscriptionNames();
50
51   /**
52    * Returns the number of pending messages for an identified subscription.
53    * The subscription must be identified by its unique 'symbolic' name.
54    *
55    * @param subName The subscription unique name.
56    * @return The number of pending message for the subscription.
57    */

58   int getSubscriptionMessageCount(String JavaDoc subName);
59
60   /**
61    * Returns the unique identifier of the topic related to this subscription.
62    *
63    * @param subName The subscription unique name.
64    * @return the unique identifier of the topic related to this subscription.
65    */

66   String JavaDoc getSubscriptionTopicId(String JavaDoc subName);
67
68   /**
69    * Returns the list of message's identifiers for a subscription.
70    * The subscription must be identified by its unique 'symbolic' name.
71    *
72    * @param subName The subscription unique name.
73    * @return the list of message's identifiers for the subscription.
74    */

75   String JavaDoc[] getSubscriptionMessageIds(String JavaDoc subName);
76
77   /**
78    * Returns the description of a particular pending message in a subscription.
79    * The subscription is identified by its unique name, the message is pointed
80    * out through its unique identifier.
81    * The description includes the type and priority of the message.
82    *
83    * @param subName The subscription unique name.
84    * @param msgId The unique message's identifier.
85    * @return the description of the message.
86    */

87   CompositeDataSupport getSubscriptionMessage(String JavaDoc subName,
88                                               String JavaDoc msgId) throws Exception JavaDoc;
89
90   /**
91    * Deletes a particular pending message in a subscription.
92    * The subscription is identified by its unique name, the message is pointed
93    * out through its unique identifier.
94    *
95    * @param subName The subscription unique name.
96    * @param msgId The unique message's identifier.
97    */

98   void deleteSubscriptionMessage(String JavaDoc subName, String JavaDoc msgId);
99
100   /**
101    * Returns the maximum number of message for identified subscription.
102    * The subscription is identified by its unique name, if the limit is unset
103    * the method returns -1.
104    *
105    * @param subName The subscription unique name.
106    * @return the maximum number of message for subscription if set;
107    * -1 otherwise.
108    */

109   int getNbMaxMsg(String JavaDoc subName);
110
111   /**
112    * Sets the maximum number of message for identified subscription.
113    * The subscription is identified by its unique name.
114    *
115    * @param subName The subscription unique name.
116    * @param nbMaxMsg the maximum number of message for subscription (-1 set
117    * no limit).
118    */

119   void setNbMaxMsg(String JavaDoc subName, int nbMaxMsg);
120
121   /**
122    * Returns a string representation of this user's proxy.
123    */

124   String JavaDoc toString();
125 }
126
Popular Tags