KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > selfmanagement > event > StatisticMonitorMBean


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  * StatisticMonitorMBean.java
26  *
27  * Created on July 11, 2005
28  */

29
30 package com.sun.enterprise.admin.selfmanagement.event;
31
32 // jmx imports
33
//
34
import javax.management.ObjectName JavaDoc;
35
36 /**
37  * Exposes the remote management interface of statistic monitor MBeans.
38  * Used for JDK version greater than 1.5.
39  *
40  * @author Sun Microsystems, Inc
41  */

42 public interface StatisticMonitorMBean {
43     
44     /**
45      * Starts the statistic monitor.
46      */

47     public void start();
48     
49     /**
50      * Stops the statistic monitor.
51      */

52     public void stop();
53     
54     // GETTERS AND SETTERS
55
//--------------------
56

57     /**
58      * Adds the specified object in the set of observed MBeans.
59      *
60      * @param object The object to observe.
61      * @exception java.lang.IllegalArgumentException the specified object is null.
62      *
63      * @since.unbundled JMX 1.2
64      */

65     public void addObservedObject(ObjectName JavaDoc object) throws java.lang.IllegalArgumentException JavaDoc;
66     
67     /**
68      * Removes the specified object from the set of observed MBeans.
69      *
70      * @param object The object to remove.
71      *
72      * @since.unbundled JMX 1.2
73      */

74     public void removeObservedObject(ObjectName JavaDoc object);
75     
76     /**
77      * Tests whether the specified object is in the set of observed MBeans.
78      *
79      * @param object The object to check.
80      * @return <CODE>true</CODE> if the specified object is in the set, <CODE>false</CODE> otherwise.
81      *
82      * @since.unbundled JMX 1.2
83      */

84     public boolean containsObservedObject(ObjectName JavaDoc object);
85     
86     /**
87      * Returns an array containing the objects being observed.
88      *
89      * @return The objects being observed.
90      *
91      * @since.unbundled JMX 1.2
92      */

93     public ObjectName JavaDoc[] getObservedObjects();
94     
95     /**
96      * Gets the object name of the object being observed.
97      *
98      * @return The object being observed.
99      *
100      * @see #setObservedObject
101      *
102      * @deprecated As of JMX 1.2, replaced by {@link #getObservedObjects}
103      */

104     @Deprecated JavaDoc
105     public ObjectName JavaDoc getObservedObject();
106     
107     /**
108      * Sets the object to observe identified by its object name.
109      *
110      * @param object The object to observe.
111      *
112      * @see #getObservedObject
113      *
114      * @deprecated As of JMX 1.2, replaced by {@link #addObservedObject}
115      */

116     @Deprecated JavaDoc
117     public void setObservedObject(ObjectName JavaDoc object);
118     
119     /**
120      * Gets the attribute being observed.
121      *
122      * @return The attribute being observed.
123      *
124      * @see #setObservedAttribute
125      */

126     public String JavaDoc getObservedAttribute();
127     
128     /**
129      * Sets the attribute to observe.
130      *
131      * @param attribute The attribute to observe.
132      *
133      * @see #getObservedAttribute
134      */

135     public void setObservedAttribute(String JavaDoc attribute);
136         
137     /**
138      * Gets the granularity period (in milliseconds).
139      *
140      * @return The granularity period.
141      *
142      * @see #setGranularityPeriod
143      */

144     public long getGranularityPeriod();
145     
146     /**
147      * Sets the granularity period (in milliseconds).
148      *
149      * @param period The granularity period.
150      * @exception java.lang.IllegalArgumentException The granularity
151      * period is less than or equal to zero.
152      *
153      * @see #getGranularityPeriod
154      */

155     public void setGranularityPeriod(long period) throws java.lang.IllegalArgumentException JavaDoc;
156     
157     /**
158      * Tests if the statistic monitor MBean is active.
159      * A statistic monitor MBean is marked active when the {@link #start start} method is called.
160      * It becomes inactive when the {@link #stop stop} method is called.
161      *
162      * @return <CODE>true</CODE> if the statistic monitor MBean is active, <CODE>false</CODE> otherwise.
163      */

164     public boolean isActive();
165 }
166
Popular Tags