KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > monitor > IMonitorable


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /**
25  * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
26  *
27  * Copyright 2001-2002 by iPlanet/Sun Microsystems, Inc.,
28  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
29  * All rights reserved.
30  */

31 package com.sun.enterprise.admin.monitor;
32
33 import java.util.Map JavaDoc;
34 import java.util.Set JavaDoc;
35
36 /**
37  * IMonitorable interface defines behaviour exhibited by any component
38  * (service) that wants to expose some of its internal state to the
39  * monitoring clients (HTML gui, command-line administration or other
40  * third party tools built over command-line admin utility).
41  */

42 public interface IMonitorable {
43
44     /**
45      * Start monitoring on this component. This will be called when monitoring
46      * is enabled on this component (or the group containing this component)
47      * through user interface.
48      * @see stopMonitoring
49      */

50     public void startMonitoring();
51
52     /**
53      * Stop monitoring on this component. Called when monitoring is disabled on
54      * user interface.
55      */

56     public void stopMonitoring();
57
58     /**
59      * Get value of specified monitored attribute.
60      * @param monitorAttributeName name of the monitored attribute
61      * @return value of the specified monitored attribute
62      */

63     public Object JavaDoc getMonitoredAttributeValue(String JavaDoc monitorAttributeName);
64
65     /**
66      * Get values of specified monitored attributes. This method returns a
67      * map of monitored attribute names and their corresponding values.
68      *
69      * @param monitorAttributeNameSet set of monitored attribute names
70      *
71      * @return map of attribute names and their values
72      */

73     public Map JavaDoc getMonitoredAttributeValues(Set JavaDoc monitorAttributeNameSet);
74
75     /**
76      * Get a map of monitored attribute names and their types. The keys in
77      * the map are names of the attribute and the values are their types. The
78      * type value are instances of class
79      * com.iplanet.ias.monitor.type.MonitoredAttributeType (or its sub-classes)
80      *
81      * @return map of names and types of all monitored attributes
82      */

83     public Map JavaDoc getMonitoringMetaData();
84 }
85
Popular Tags