KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > config > SystemPropertiesAccess


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 package com.sun.appserv.management.config;
24
25 import java.util.Map JavaDoc;
26
27 import com.sun.appserv.management.base.XTypes;
28
29
30 /**
31     All MBeans that have system Properties must extend this interface.
32     <p>
33     Properties are always Strings. Property names are required to be unique.
34     
35     @see ClusterConfig
36     @see ConfigConfig
37     @see DomainConfig
38     @see ClusteredServerConfig
39     @see StandaloneServerConfig
40  */

41 public interface SystemPropertiesAccess
42 {
43     /**
44         When a key is required for a system property in a Map,
45         its name must consist of this prefix plus the actual name. When
46         accessing a property directly, this prefix must not be used.
47      */

48     final static String JavaDoc SYSTEM_PROPERTY_PREFIX = "system-" + PropertiesAccess.PROPERTY_PREFIX;
49     
50     
51     /**
52         Get the names of all system properties.
53      */

54     public String JavaDoc[] getSystemPropertyNames( );
55     
56     
57     /**
58         @return Map containing all properties, keyed by name
59      */

60     public Map JavaDoc<String JavaDoc,String JavaDoc> getSystemProperties();
61     
62     /**
63         Get the value of a property.
64         
65         @param propertyName the name of the property
66      */

67     public String JavaDoc getSystemPropertyValue( String JavaDoc propertyName );
68                     
69     /**
70         Set the value of a system property. The property must already exist.
71         The existing description is retained.
72         
73         @param propertyName the name of the property
74         @param propertyValue the value of the property
75      */

76     public void setSystemPropertyValue( String JavaDoc propertyName, String JavaDoc propertyValue );
77                         
78     /**
79         Return true if any system properties exist with the specified name.
80         
81         @param propertyName the name of the property
82      */

83     public boolean existsSystemProperty( String JavaDoc propertyName );
84     
85     /**
86         Create a new system property.
87         
88         @param propertyName the name of the property
89         @param propertyValue the value of the property
90      */

91     public void createSystemProperty( String JavaDoc propertyName, String JavaDoc propertyValue);
92     
93     /**
94         Remove a system property with the specified name.
95         
96         @param propertyName the name of the property
97      */

98     public void removeSystemProperty( String JavaDoc propertyName );
99 }
100
101
102
103
Popular Tags