KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2005 - 2006 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): Benoit Pelletier (Bull SA)
22  */

23 package org.objectweb.joram.client.jms.admin;
24
25 import java.io.File JavaDoc;
26 import java.net.ConnectException JavaDoc;
27 import java.util.List JavaDoc;
28 import java.util.Properties JavaDoc;
29
30 import javax.jms.Destination JavaDoc;
31
32 import org.objectweb.joram.client.jms.Queue;
33 import org.objectweb.joram.client.jms.Topic;
34
35 /**
36  *
37  */

38 public interface JoramAdminMBean {
39
40   public void exit();
41
42   public void setTimeOutToAbortRequest(long timeOut);
43
44   public long getTimeOutToAbortRequest();
45
46   public DeadMQueue getDefaultDMQ(int serverId)
47     throws ConnectException JavaDoc, AdminException;
48
49   public void setDefaultDMQ(int serverId, DeadMQueue dmq)
50     throws ConnectException JavaDoc, AdminException;
51
52   public DeadMQueue getDefaultDMQ()
53     throws ConnectException JavaDoc, AdminException;
54
55   public List JavaDoc getDestinations(int serverId);
56
57   public List JavaDoc getDestinations();
58
59   public List JavaDoc getUsers(int serverId);
60
61   public List JavaDoc getUsers();
62
63   public void createUser(String JavaDoc name, String JavaDoc password)
64     throws AdminException;
65
66   public void createUser(String JavaDoc name, String JavaDoc password, int serverId)
67     throws AdminException;
68
69   public Destination JavaDoc createQueue(String JavaDoc name)
70     throws AdminException;
71
72   public Destination JavaDoc createQueue(int serverId, String JavaDoc name)
73     throws AdminException;
74
75   public Destination JavaDoc createQueue(int serverId,
76                                  String JavaDoc name,
77                                  String JavaDoc className,
78                                  Properties JavaDoc prop)
79     throws AdminException;
80
81   public Destination JavaDoc createTopic(String JavaDoc name)
82     throws AdminException;
83
84   public Destination JavaDoc createTopic(int serverId, String JavaDoc name)
85     throws AdminException;
86
87   public Destination JavaDoc createTopic(int serverId,
88                                  String JavaDoc name,
89                                  String JavaDoc className,
90                                  Properties JavaDoc prop)
91     throws AdminException;
92
93
94   /**
95    * Export the repository content to an XML file
96    * - only the destinations objects are retrieved in this version
97    * - xml script format of the admin objects (joramAdmin.xml)
98    * @param exportDir target directory where the export file will be put
99    * @throws AdminException if an error occurs
100    */

101   public void exportRepositoryToFile(String JavaDoc exportDir)
102     throws AdminException;
103
104   public boolean executeXMLAdminJMX(String JavaDoc path)
105     throws Exception JavaDoc;
106 }
107
Popular Tags