KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > client > jms > admin > UserMBean


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 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): Nicolas Tachker (ScalAgent DT)
21  * Contributor(s):
22  */

23 package org.objectweb.joram.client.jms.admin;
24
25 import org.objectweb.joram.client.jms.Message;
26 import org.objectweb.joram.client.jms.admin.Subscription;
27 import java.net.ConnectException JavaDoc;
28 import java.util.List JavaDoc;
29 import javax.jms.JMSException JavaDoc;
30
31 public interface UserMBean {
32
33   /** Returns a string view of this <code>User</code> instance. */
34   public String JavaDoc toString();
35
36   /** Returns the user name. */
37   public String JavaDoc getName();
38
39   /**
40    * Removes this user.
41    */

42   public void delete()
43     throws ConnectException JavaDoc, AdminException;
44
45   /**
46    * Admin method setting a given dead message queue for this user.
47    */

48   public void setDMQ(DeadMQueue dmq)
49     throws ConnectException JavaDoc, AdminException;
50
51   /**
52    * Admin method setting a given value as the threshold for this user.
53    */

54   public void setThreshold(int thresh)
55     throws ConnectException JavaDoc, AdminException;
56
57   public void setNbMaxMsg(String JavaDoc subName, int nbMaxMsg)
58     throws ConnectException JavaDoc, AdminException;
59
60   public int getNbMaxMsg(String JavaDoc subName)
61     throws ConnectException JavaDoc, AdminException;
62
63   /**
64    * Returns the dead message queue for this user, null if not set.
65    */

66   public DeadMQueue getDMQ()
67     throws ConnectException JavaDoc, AdminException;
68
69   /**
70    * Returns the threshold for this user, -1 if not set.
71    */

72   public int getThreshold()
73     throws ConnectException JavaDoc, AdminException;
74
75   /**
76    * Returns the subscriptions owned by a user.
77    */

78   public List JavaDoc getSubscriptionList()
79     throws ConnectException JavaDoc, AdminException;
80
81   public Subscription[] getSubscriptions()
82     throws AdminException, ConnectException JavaDoc;
83
84   /**
85    * Returns a subscription.
86    */

87   public String JavaDoc getSubscriptionString(String JavaDoc subName)
88     throws ConnectException JavaDoc, AdminException;
89
90   public Subscription getSubscription(String JavaDoc subName)
91     throws AdminException, ConnectException JavaDoc;
92
93   public String JavaDoc[] getMessageIds(String JavaDoc subName)
94     throws ConnectException JavaDoc, AdminException;
95
96   public Message readMessage(String JavaDoc subName, String JavaDoc msgId)
97     throws AdminException, ConnectException JavaDoc, JMSException JavaDoc;
98
99   public void deleteMessage(String JavaDoc subName, String JavaDoc msgId)
100     throws AdminException, ConnectException JavaDoc;
101
102   public void clearSubscription(String JavaDoc subName)
103     throws AdminException, ConnectException JavaDoc;
104
105    
106   /** Returns the identifier of the user's proxy. */
107   public String JavaDoc getProxyId();
108 }
109
Popular Tags