KickJava   Java API By Example, From Geeks To Geeks.

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


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
26 import java.util.Map JavaDoc;
27
28 import com.sun.appserv.management.base.XTypes;
29 import com.sun.appserv.management.base.Container;
30
31
32 /**
33     Manipulates management rules.
34     
35     @since Appserver 9.0
36 */

37
38 public interface ManagementRulesConfig
39     extends ConfigElement, Container, Enabled
40 {
41 /** The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType} */
42     public static final String JavaDoc J2EE_TYPE = XTypes.MANAGEMENT_RULES_CONFIG;
43     
44     public Map JavaDoc<String JavaDoc,ManagementRuleConfig> getManagementRuleConfigMap();
45     
46     /** For use with createManagementRuleConfig() specifying description of the rule (String)*/
47     public static final String JavaDoc RULE_DESCRIPTION_KEY = "Description";
48     
49     /** For use with createManagementRuleConfig() specifying whether the rule is to be enabled (Boolean)*/
50     public static final String JavaDoc RULE_ENABLED_KEY = "Enabled";
51     
52     /** For use with createManagementRuleConfig() specifying whether event logging is to be enabled (Boolean)*/
53     public static final String JavaDoc EVENT_LOG_ENABLED_KEY = "EventLogEnabled";
54     
55     /** For use with createManagementRuleConfig() specifying Event Level [default=INFO] (String)*/
56     public static final String JavaDoc EVENT_LEVEL_KEY = "EventLevel";
57     
58     /** For use with createManagementRuleConfig() specifying Event properties (Properties)*/
59     public static final String JavaDoc EVENT_PROPERTIES_KEY = "EventProperties";
60     
61     /** For use with createManagementRuleConfig() specifying Event description (String)*/
62     public static final String JavaDoc EVENT_DESCRIPTION_KEY = "EventDescription";
63     
64     /**
65         Create new self management rule. In addition to the formal parameters, the following
66         optional parameters may be specified:
67         <ul>
68         <li>{@link #RULE_DESCRIPTION_KEY}</li>
69         <li>{@link #RULE_ENABLED_KEY}</li>
70         <li>{@link #EVENT_DESCRIPTION_KEY}</li>
71         <li>{@link #EVENT_LOG_ENABLED_KEY}</li>
72         <li>{@link #EVENT_LEVEL_KEY}</li>
73         <li>{@link #EVENT_PROPERTIES_KEY}</li>
74         </ul>
75         
76         @param ruleName name of the management rule. Required.
77         @param eventType one of the values defined in {@link EventTypeValues}
78         @param actionMBeanName actionMbeanName associated with rule (optional)
79         @param optional optional additional values
80
81         @return ObjectName of created management-rule
82         @throws Exception
83         @see EventTypeValues
84      */

85     public ManagementRuleConfig createManagementRuleConfig(
86                 String JavaDoc ruleName,
87                 String JavaDoc eventType,
88                 String JavaDoc actionMBeanName,
89                 Map JavaDoc<String JavaDoc,String JavaDoc> optional );
90                                         
91     public void removeManagementRuleConfig( String JavaDoc name );
92 }
93
94
95
96
97
98
99
100
101
102
103
104
105
Popular Tags