KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > j2ee > statistics > MapStatistic


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  * $Header: /cvs/glassfish/admin-core/mbeanapi/src/java/com/sun/appserv/management/j2ee/statistics/MapStatistic.java,v 1.4 2006/03/09 20:30:29 llc Exp $
26  * $Revision: 1.4 $
27  * $Date: 2006/03/09 20:30:29 $
28  */

29
30 package com.sun.appserv.management.j2ee.statistics;
31
32 import java.util.Set JavaDoc;
33 import java.util.Map JavaDoc;
34
35 import javax.management.j2ee.statistics.Statistic JavaDoc;
36
37 /**
38     A Statistic which contains its members in a Map.
39  */

40 public interface MapStatistic extends Statistic JavaDoc
41 {
42     /**
43         Get a Statistic value which is expected to be a Long (long)
44      */

45     public long getlong( String JavaDoc name );
46     
47     /**
48         Get a Statistic value which is expected to be an Integer (int)
49      */

50     public int getint( String JavaDoc name );
51     
52     
53     /**
54         Get a Statistic value which is expected to be a String
55      */

56     public String JavaDoc getString( String JavaDoc name );
57
58     
59     /**
60         Get a Statistic value which is expected to be any Object
61      */

62     public Object JavaDoc getValue( String JavaDoc name );
63     
64     /**
65         Set the name of this Statistic
66      */

67     public String JavaDoc setName( final String JavaDoc newName );
68
69     
70     /**
71         Get the values associated with this statistic.
72         
73         Note the name--"get" is avoided so it won't be introspected
74         as another Statistic field.
75         
76         @return an unmodifiableSet of the field names (String)
77      */

78     public Set JavaDoc valueNames();
79     
80     
81     public Map JavaDoc<String JavaDoc,Object JavaDoc> asMap();
82     public String JavaDoc toString();
83 }
84
85
86
87
88
89
Popular Tags