KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > dottedname > DottedNameGetSet


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/admin/src/java/com/sun/enterprise/admin/dottedname/DottedNameGetSet.java,v 1.3 2005/12/25 03:47:31 tcfujii Exp $
26  * $Revision: 1.3 $
27  * $Date: 2005/12/25 03:47:31 $
28  */

29  
30
31 package com.sun.enterprise.admin.dottedname;
32
33 import javax.management.Attribute JavaDoc;
34 import javax.management.AttributeList JavaDoc;
35
36 /*
37     Interface for supporting CLI 'get' and 'set' commands.
38  */

39 public interface DottedNameGetSet
40 {
41     /*
42         Get multiple dotted-name values. Input can be one or more names, any of which
43         may be wildcarded.
44         
45         If there are N names in the input the resulting Object []
46         will also be of length N. Each element in the output Object [] will be:
47           - an Attribute if the input value was a single dotted-name
48           - an Attribute [] if the input value was a wildcarded dotted-name (could be of any length)
49           - an Exception if there was a problem (usually AttributeNotFoundException)
50         
51         
52         When using wildcarded name, the result will usually never be an Exception unless
53         there was some low-level problem; an regex that matches nothing will return
54         an empty AttributeList.
55         
56         @param name dotted name of the Attribute
57         @returns AttributeList for dotted-names which were gotten.
58      */

59     public Object JavaDoc [] dottedNameGet( String JavaDoc [] names ) ;
60     
61     /*
62         Same as dottedNameGet( String [] ), but for a single name, which may be wildcarded.
63         Completely equivalent to dottedNameGet( new String[] { name } )
64         
65         An exception may be returned; it will not be thrown.
66      */

67     public Object JavaDoc dottedNameGet( String JavaDoc name );
68     
69     /*
70         Set multiple dotted-name values. Input must be one or more names. Wildcarding
71         is disallowed.
72         
73         If there are N names in the input the resulting Object []
74         will also be of length N. Each entry in the output Object [] will be:
75           - an Attribute if it was successfully set
76           - an Exception if there was a problem
77         
78         @param name dotted name of the Attribute
79         @returns AttributeList for dotted-names which were set.
80      */

81     public Object JavaDoc [] dottedNameSet( String JavaDoc [] names );
82     public Object JavaDoc dottedNameSet( String JavaDoc name );
83
84     /*
85         Same as dottedNameGet, but for monitoring.
86      */

87     public Object JavaDoc [] dottedNameMonitoringGet( String JavaDoc [] names ) ;
88     public Object JavaDoc dottedNameMonitoringGet( String JavaDoc name ) ;
89     
90     /*
91         Return a Set of String (dotted names) that match the name prefixes for
92         non-monitoring dotted names.
93         
94         @param namePrefixes array of dotted-name prefixes (may be wildcarded)
95      */

96     public String JavaDoc [] dottedNameList( String JavaDoc [] namePrefixes);
97     
98     /*
99         Return a Set of String (dotted names) that match the name prefixes,
100         but only for monitoring dotted names.
101         
102         @param namePrefixes array of dotted-name prefixes (may be wildcarded)
103      */

104     public String JavaDoc [] dottedNameMonitoringList( String JavaDoc [] namePrefixes );
105 }
106
Popular Tags