KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > client > jms > DestinationMBean


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;
24
25 import org.objectweb.joram.client.jms.admin.AdminException;
26 import org.objectweb.joram.client.jms.admin.DeadMQueue;
27
28 import java.net.ConnectException JavaDoc;
29 import java.util.List JavaDoc;
30 import java.util.Hashtable JavaDoc;
31 import javax.jms.JMSException JavaDoc;
32
33 public interface DestinationMBean {
34
35   public String JavaDoc getName();
36   public String JavaDoc getAdminName();
37   public String JavaDoc getType();
38
39   /**
40    * Returns <code>true</code> if the destination is a queue.
41    */

42   public boolean isQueue();
43
44   /**
45    * Admin method removing this destination from the platform.
46    */

47   public void delete()
48     throws ConnectException JavaDoc, AdminException, JMSException JavaDoc;
49
50   public void addReader(String JavaDoc proxyId)
51     throws ConnectException JavaDoc, AdminException;
52
53   public void addWriter(String JavaDoc proxyId)
54     throws ConnectException JavaDoc, AdminException;
55
56   public void removeReader(String JavaDoc proxyId)
57     throws ConnectException JavaDoc, AdminException;
58
59   public void removeWriter(String JavaDoc proxyId)
60     throws ConnectException JavaDoc, AdminException;
61
62
63   /**
64    * Monitoring method returning the list of all users that have a reading
65    * permission on this destination, or an empty list if no specific readers
66    * are set.
67    */

68   public List JavaDoc getReaderList()
69     throws ConnectException JavaDoc, AdminException;
70
71   /**
72    * Monitoring method returning the list of all users that have a writing
73    * permission on this destination, or an empty list if no specific writers
74    * are set.
75    */

76   public List JavaDoc getWriterList()
77     throws ConnectException JavaDoc, AdminException;
78
79   /**
80    * Monitoring method returning <code>true</code> if this destination
81    * provides free READ access.
82    */

83   public boolean isFreelyReadable()
84     throws ConnectException JavaDoc, AdminException;
85
86   /**
87    * Monitoring method returning <code>true</code> if this destination
88    * provides free WRITE access.
89    */

90   public boolean isFreelyWriteable()
91     throws ConnectException JavaDoc, AdminException;
92
93   /**
94    * Admin method setting free reading access to this destination.
95    */

96   public void setFreelyReadable(boolean b)
97     throws ConnectException JavaDoc, AdminException;
98
99   /**
100    * Admin method setting free writing access to this destination.
101    */

102   public void setFreelyWriteable(boolean b)
103     throws ConnectException JavaDoc, AdminException;
104
105   /**
106    * Monitoring method returning the dead message queue of this destination,
107    * null if not set.
108    */

109   public DeadMQueue getDMQ()
110     throws ConnectException JavaDoc, AdminException;
111
112   /**
113    * Admin method setting or unsetting a dead message queue for this
114    * destination.
115    */

116   public void setDMQ(DeadMQueue dmq)
117     throws ConnectException JavaDoc, AdminException;
118
119   public Hashtable JavaDoc getStatistic()
120     throws ConnectException JavaDoc, AdminException;
121 }
122
Popular Tags