KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jmx > ManagementRepr


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: ManagementRepr.java,v 1.3 2004/03/19 14:31:49 sauthieg Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.jmx;
27
28 import java.util.Properties JavaDoc;
29 import java.util.Set JavaDoc;
30
31 import javax.management.AttributeList JavaDoc;
32 import javax.management.MBeanInfo JavaDoc;
33 import javax.management.ObjectName JavaDoc;
34 import javax.naming.Context JavaDoc;
35 import javax.naming.NamingException JavaDoc;
36
37 /**
38  * Defines all the management operations invoked by management applications through the
39  * <code>JonasManagementRepr</code> class.
40  * @author Adriana Danes
41  */

42 public interface ManagementRepr {
43
44     /**
45      * @return True if the MBean is already registered in the MBean server, false otherwise or if an exception is catched.
46      */

47     public boolean isRegistered(ObjectName JavaDoc on) ;
48
49     /**
50      * @param on The ObjectName of the MBean of which the attribute is to be retrieved.
51      * @param attribute A String specifying the name of the attribute to be retrieved.
52      * @return The value of the attribute.
53      */

54     public Object JavaDoc getAttribute(ObjectName JavaDoc on, String JavaDoc attribute)
55         throws ManagementException ;
56
57     /**
58      * @param on The ObjectName of the MBean of which attribute are to be retrieved.
59      * @param attributes A list of the attributes to be retrieved.
60      * @return Thelist of retrieved attributes.
61      */

62     public AttributeList JavaDoc getAttributes(ObjectName JavaDoc on, String JavaDoc[] attributes)
63         throws ManagementException ;
64
65     /**
66      * @param on The ObjectName of the MBean of which the attribute is to be set
67      * @param attribute A String specifying the name of the attribute to be retrieve.
68      * @param value The value to set to the attribute.
69      */

70     public void setAttribute(ObjectName JavaDoc on, String JavaDoc attribute, Object JavaDoc value)
71         throws ManagementException;
72
73     /**
74      * @param on The ObjectName of the MBean of which the attribute is to be set.
75      * @param attributes A list of attributes: The identification of the attribute to be set and the value it is to be set to
76      * @return The list of attributes that were set, with their new values.
77      */

78     public AttributeList JavaDoc setAttributes(ObjectName JavaDoc on, AttributeList JavaDoc attributes)
79         throws ManagementException;
80
81     /**
82      * @param on
83      */

84     public Object JavaDoc invoke(ObjectName JavaDoc on, String JavaDoc operation, Object JavaDoc[] param, String JavaDoc[] signature)
85         throws ManagementException;
86
87     /**
88      * @return A set containing the ObjectNames for the MBeans selected.
89      */

90     public java.util.Set JavaDoc queryNames(ObjectName JavaDoc on)
91         throws ManagementException;
92
93     /**
94      * @return An instance of MBeanInfo allowing the retrieval of all
95      * attributes and operations of this MBean.
96      */

97     public MBeanInfo JavaDoc getMBeanInfo(ObjectName JavaDoc name) throws ManagementException;
98
99     /**
100      * @return Context the current application context.
101      */

102     public Context JavaDoc getContext() throws NamingException JavaDoc;
103
104     /**
105      * @return String the name of the current RMI connector.
106      */

107     public String JavaDoc getCurrentRMIConnectorName();
108
109     /**
110      * Set the currentRMIConnectorName to the specified value
111      */

112     public void setCurrentRMIConnectorName(String JavaDoc name) throws Exception JavaDoc;
113
114     /**
115      * Set the currentRMIConnectorName to null
116      */

117     public void resetCurrentRMIConnectorName();
118
119     /**
120      * @return Set a set containning all RMI connector names available in the current context.
121      */

122     public Set JavaDoc getRMIConnectorsNames() throws NamingException JavaDoc;
123
124     /**
125      * @return String the value of the PROVIDER_URL property in the current context.
126      */

127     public String JavaDoc getJonasNamingServiceURL();
128
129     /**
130      * Sets the PROVIDER_URL property to the specified value.
131      */

132     public void setJonasNamingServiceURL(String JavaDoc url) throws NamingException JavaDoc;
133
134     /**
135      * Create a new naming context based on the given env. properties
136      */

137     public void setNamingEnvCtx(Properties JavaDoc env) throws javax.naming.NamingException JavaDoc;
138 }
139
Popular Tags