KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > DomainRoot


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 package com.sun.appserv.management;
25
26 import java.util.Map JavaDoc;
27
28 import javax.management.ObjectName JavaDoc;
29
30 import com.sun.appserv.management.base.*;
31 import com.sun.appserv.management.ext.wsmgmt.WebServiceMgr;
32 import com.sun.appserv.management.config.DomainConfig;
33 import com.sun.appserv.management.config.ConfigDottedNames;
34 import com.sun.appserv.management.ext.lb.LoadBalancer;
35 import com.sun.appserv.management.monitor.MonitoringDottedNames;
36 import com.sun.appserv.management.monitor.MonitoringRoot;
37 import com.sun.appserv.management.monitor.JMXMonitorMgr;
38 import com.sun.appserv.management.deploy.DeploymentMgr;
39 import com.sun.appserv.management.j2ee.J2EEDomain;
40
41 /**
42     The top-level interface for an appserver domain. Access to all other
43     {@link AMX} begins here.
44  */

45 public interface DomainRoot extends Container
46 {
47     public final static String JavaDoc J2EE_TYPE = XTypes.DOMAIN_ROOT;
48
49     /**
50       Return the name of this appserver domain. Not to be confused with the
51       JMX domain name, which may be derived from this name and is
52       available from any ObjectName in AMX by calling
53       {@link Util#getObjectName}
54
55       The domain name is equivalent to the name of
56       the directory containing the domain configuration. This name
57       is not part of the configuration and can only be changed by
58       using a different directory to house the configuration for the
59       domain.
60       @return the name of the Appserver domain
61      */

62     public String JavaDoc getAppserverDomainName();
63
64     /**
65       @return the JSR 77 J2EEDomain.
66      */

67     public J2EEDomain getJ2EEDomain();
68
69     /**
70         @return the singleton DomainConfig
71      */

72     public DomainConfig getDomainConfig();
73
74
75     /**
76         @return the singleton JMXMonitorMgr
77      */

78     public JMXMonitorMgr getJMXMonitorMgr() ;
79
80     /**
81             Get the NotificationServiceMgr
82      */

83     public NotificationServiceMgr getNotificationServiceMgr();
84
85     /**
86         @return the singleton SystemInfo
87      */

88     public SystemInfo getSystemInfo();
89     
90     /**
91        @return the singleton WebServiceMgr for this domain.
92        @since AppServer 9.0
93     */

94     public WebServiceMgr getWebServiceMgr();
95
96     /**
97             Get all {@link NotificationEmitterService} instances.
98             Possible kinds include those defined in {@link NotificationEmitterServiceKeys}.
99             @since AppServer 9.0
100      */

101     public Map JavaDoc<String JavaDoc,NotificationEmitterService>
102             getNotificationEmitterServiceMap();
103
104     /**
105         Get the NotificationEmitterService whose name is
106         {@link NotificationEmitterServiceKeys#DOMAIN_KEY}. Same
107         as calling <code>getNotificationEmitterServiceMap().get( DOMAIN_KEY )</code>.
108        @return the singleton {@link NotificationEmitterService}.
109      */

110     public NotificationEmitterService getDomainNotificationEmitterService();
111
112
113     /**
114         @return the singleton {@link QueryMgr}.
115      */

116     public QueryMgr getQueryMgr();
117
118     /**
119         @return the singleton {@link BulkAccess}.
120      */

121     public BulkAccess getBulkAccess();
122
123     /**
124        @return the singleton {@link UploadDownloadMgr}.
125      */

126     public UploadDownloadMgr getUploadDownloadMgr();
127
128     /**
129         @return the singleton {@link ConfigDottedNames}.
130      */

131     public ConfigDottedNames getConfigDottedNames() ;
132
133     /**
134         @return the singleton {@link MonitoringDottedNames}
135      */

136     public MonitoringDottedNames getMonitoringDottedNames() ;
137         
138     /**
139         @return the singleton {@link MonitoringRoot}.
140      */

141     public MonitoringRoot getMonitoringRoot() ;
142
143     /**
144         @return the singleton {@link DeploymentMgr}.
145      */

146     public DeploymentMgr getDeploymentMgr() ;
147
148     /**
149         Get all the {@link LoadBalancer} instances
150         @return Map of items, keyed by name.
151         @see LoadBalancer
152         @see com.sun.appserv.management.config.LoadBalancerConfig
153         @since AppServer 9.0
154      */

155     public Map JavaDoc<String JavaDoc,LoadBalancer> getLoadBalancerMap();
156     
157     
158     /**
159         Notification type for JMX Notification issued when AMX MBeans are loaded
160         and ready for use.
161         @see #getAMXReady
162      */

163     public static final String JavaDoc AMX_READY_NOTIFICATION_TYPE =
164         AMX.NOTIFICATION_PREFIX + "DomainRoot" + ".AMXReady";
165         
166     /**
167         Poll to see if AMX is ready for use. It is more efficient to instead listen
168         for a Notification of type {@link #AMX_READY_NOTIFICATION_TYPE}. That
169         should be done by first registering the listener, then checking
170         just after registration in case the Notification was issued in the ensuing
171         interval just before the listener became registered.
172         
173         @return true if AMX is ready for use, false otherwise.
174         @see #AMX_READY_NOTIFICATION_TYPE
175      */

176     public boolean getAMXReady();
177       
178     /**
179         Wait (block) until AMX is ready for use. Upon return, AMX is ready for use.
180      */

181     public void waitAMXReady();
182 }
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
Popular Tags