KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > kernel > admin > service > PetalsAdminServiceMBean


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 EBM Websourcing, http://www.ebmwebsourcing.com/
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 (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: PetalsAdminServiceMBean.java 16:40:52 alouis $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.kernel.admin.service;
23
24 import java.util.Collection JavaDoc;
25 import java.util.List JavaDoc;
26 import java.util.Map JavaDoc;
27
28
29 /**
30  * This class is a manager of JMX server. It is used to get a connection to a
31  * JMX Server on a distant container.
32  *
33  * @author ddesjardins - eBMWebsourcing
34  */

35 public interface PetalsAdminServiceMBean {
36
37     public static final String JavaDoc CONF_HOST="host";
38     public static final String JavaDoc CONF_HTML_PORT="htmlPort";
39     public static final String JavaDoc CONF_JMX_LOGIN="jmxLogin";
40     public static final String JavaDoc CONF_JMX_PASSWORD="jmxPassword";
41     public static final String JavaDoc CONF_JMX_PORT="jmxPort";
42     public static final String JavaDoc CONF_JNDI_FACTORY="jndiFactory";
43     public static final String JavaDoc CONF_JNDI_PORT="jndiPort";
44     public static final String JavaDoc CONF_JORAM_DOMAIN="joramDomain";
45     public static final String JavaDoc CONF_JORAM_DOMAIN_PORT="joramDomainPort";
46     public static final String JavaDoc CONF_JORAM_ID="joramId";
47     public static final String JavaDoc CONF_JORAM_LOGIN="joramLogin";
48     public static final String JavaDoc CONF_JORAM_PASSWORD="joramPassword";
49     public static final String JavaDoc CONF_JORAM_TCP_PORT="joramTCPPort";
50     public static final String JavaDoc CONF_NAME="name";
51     public static final String JavaDoc CONF_STATE="state";
52     public static final String JavaDoc CONF_UID="uid";
53     
54     /**
55      * Unload the container from the Petals global environment.
56      * All ServiceAssemblies, Components and Share Libraries are
57      * stopped, shutdown, and uninstalled.
58      * All registered Endpoints are deactivated.
59      * Then the container is removed from the domain.
60      * @throws Exception
61      */

62     void shutdownContainer() throws Exception JavaDoc;
63     
64     /**
65      * Stop the container.
66      * The container is still visible in the Petals global environment,
67      * but marked as 'stopped'.
68      * The registered Endpoints are still visible,too.
69      * @throws Exception
70      */

71     void stopContainer() throws Exception JavaDoc;
72    
73     /**
74      * Retrieve the collection of all the Started servers configuration from this
75      * domain. keys are :<br>
76      * - "host"<br>
77      * - "htmlPort"<br>
78      * - "jmxLogin"<br>
79      * - "jmxPassword"<br>
80      * - "jmxPort"<br>
81      * - "joramDomain"<br>
82      * - "joramDomainPort"<br>
83      * - "joramTCPPort"<br>
84      * - "joramId"<br>
85      * - "joramLogin"<br>
86      * - "joramPassword"<br>
87      * - "name"<br>
88      * - "state"<br>
89      * - "uid"<br>
90      *
91      * @return Collection of started server information (Map key;value)
92      */

93     Collection JavaDoc<Map JavaDoc<String JavaDoc,String JavaDoc>> getAllStartedServersConfiguration();
94     
95     /**
96      * Retrieve the collection of all the servers configuration from this
97      * domain. keys are :<br>
98      * - "host"<br>
99      * - "htmlPort"<br>
100      * - "jmxLogin"<br>
101      * - "jmxPassword"<br>
102      * - "jmxPort"<br>
103      * - "joramDomain"<br>
104      * - "joramDomainPort"<br>
105      * - "joramTCPPort"<br>
106      * - "joramId"<br>
107      * - "joramLogin"<br>
108      * - "joramPassword"<br>
109      * - "name"<br>
110      * - "state"<br>
111      * - "uid"<br>
112      *
113      * @return Collection of server information (Map key;value)
114      */

115     Collection JavaDoc<Map JavaDoc<String JavaDoc,String JavaDoc>> getAllServersConfiguration();
116
117     /**
118      * Remove the specified server from the network configuration. <br>
119      * The server is unbound, but not shutdown. All ServiceEndpoints activated
120      * on this server are unbound. <br>
121      * <b>Be very careful when using this operation, the network configuration
122      * may become unstable.</b><br>
123      * TODO JORAM configuration not updated
124      * @param serverName
125      * @throws Exception
126      * The server is not found in the network configuration, some
127      * Endpoints have not been removed, or problem while accessing
128      * the network configuration
129      */

130    void removeServerFromNetwork(String JavaDoc serverName) throws Exception JavaDoc;
131
132    /**
133     * shows if the monitoring is started or stopped.
134     * @return
135     */

136    boolean getMonitoring();
137    
138    /**
139     * start or stop the monitoring.
140     * the monitoring information is reset when state is set to FALSE
141     * @param state
142     */

143    void setMonitoring(boolean activate) throws Exception JavaDoc;
144    
145    /**
146     * Return information about messages exchanges since the specified date.<br>
147     * Information are sort by exchange-start-date.
148     * Information is returned in a bulk mode, with no specific Java Object. <br>
149     * - Each element of the list represents an exchange report.<br>
150     * &nbsp;&nbsp;- an exchange report is a <em>List(Map(String,Object))</em> of the different captures of the exchange<br>
151     * &nbsp;&nbsp;&nbsp;&nbsp;- a capture is a Map of <em>Object</em> objects, following the structure:<br>
152     * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- "id" <em>String</em> the id of the exchange<br>
153     * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- "time" <em>long</em> the date of the capture<br>
154     * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- "component" <em>String</em> the component that interact on this exchange<br>
155     * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- "role" <em>String</em> the role of the component : [consumer|provider]<br>
156     * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- "type" <em>String</em> the message type : [in|out|fault|ANY]<br>
157     * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- "status"<em>String</em> the message status : [active|done|error]<br>
158     *
159     * @param sinceTime <em>long</em> representation of the date, in the standard <em>long<em> format
160     * @return the raw reports. not null, may be empty
161     */

162    List JavaDoc<List JavaDoc<Map JavaDoc<String JavaDoc,Object JavaDoc>>> bulkData(long sinceTime);
163    }
164
Popular Tags