KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > AdminContext


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.enterprise.admin;
24
25 import java.util.logging.Logger JavaDoc;
26 import java.net.URL JavaDoc;
27
28 import javax.management.MBeanServer JavaDoc;
29 import com.sun.enterprise.config.ConfigContext;
30 import com.sun.enterprise.admin.util.proxy.Interceptor;
31
32 /**
33  * This interface defines the environment for administration.
34  */

35 public interface AdminContext {
36
37     /**
38      * Get runtime config context. Runtime config context provides access to
39      * the configuration that the server is running with. The server reads
40      * the configuration from disk at startup time, the configuration is
41      * then updated for every change that is applied dynamically.
42      */

43     public ConfigContext getRuntimeConfigContext();
44
45     /**
46      * Set runtime config context. If server runtime handles a configuration
47      * change dynamically, the context of the runtime is updated with the new
48      * changes.
49      * @param ctc the config context to use for runtime
50      */

51     public void setRuntimeConfigContext(ConfigContext ctx);
52
53     /**
54      * Get admin config context. Admin config context provides access to the
55      * configuration on the disk. This may be different from runtime context
56      * if one or changes have not been applied dynamically to the runtime.
57      */

58     public ConfigContext getAdminConfigContext();
59
60     /**
61      * Set admin config context. This is the context used for updating
62      * configuration on the disk.
63      * @param ctx the config context to use for administration
64      */

65     public void setAdminConfigContext(ConfigContext ctx);
66     
67     /**
68      * Get MBeanServer in use for admin, runtime and monitoring MBeans.
69      */

70     public MBeanServer JavaDoc getMBeanServer();
71
72     /**
73      * Set MBeanServer used for admin, runtime and monitoring MBeans.
74      * @param mbs the management bean server
75      */

76     public void setMBeanServer(MBeanServer JavaDoc mbs);
77
78     /**
79      * Get domain name
80      */

81     public String JavaDoc getDomainName();
82
83     /**
84      * Set domain name.
85      * @param domainName name of the domain
86      */

87     public void setDomainName(String JavaDoc domainName);
88
89     /**
90      * Get server name.
91      */

92     public String JavaDoc getServerName();
93
94     /**
95      * Set server name.
96      * @param serverName name of the server
97      */

98     public void setServerName(String JavaDoc serverName);
99
100     /**
101      * Get Admin MBeanRegistry xml file location
102      */

103     public URL JavaDoc getAdminMBeanRegistryURL();
104
105
106     /**
107      * Get Admin MBeanRegistry xml file location
108      * @param url URL of the Registry file
109      */

110     public void setAdminMBeanRegistryURL(URL JavaDoc url);
111
112     /**
113      * Get Admin MBeanRegistry xml file location
114      */

115     public URL JavaDoc getRuntimeMBeanRegistryURL();
116
117
118     /**
119      * Get Runtime MBeanRegistry xml file location
120      * @param url URL of the Registry file
121      */

122     public void setRuntimeMBeanRegistryURL(URL JavaDoc url);
123
124     /**
125      * Get admin logger.
126      */

127     public Logger JavaDoc getAdminLogger();
128
129     /**
130      * Set admin logger.
131      * @param logger the logger for admin module
132      */

133     public void setAdminLogger(Logger JavaDoc logger);
134
135     /**
136      * Get interceptor for mbean server used. In general, this method will
137      * be used only while initializing MBeanServer to setup its interceptor.
138      */

139     public Interceptor getMBeanServerInterceptor();
140
141     /**
142      * Set interceptor. If set prior to creating an MBeanServer, the default
143      * implementation of SunOneMBeanServer factory will apply the interceptor
144      * to every MBeanServer call.
145      */

146     public void setMBeanServerInterceptor(Interceptor interceptor);
147
148     /**
149      * returns the appropriate dotted name mbean implementation class.
150      */

151     public String JavaDoc getDottedNameMBeanImplClassName();
152 }
153
Popular Tags