KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > mbeans > DomainStatusMBean


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.enterprise.admin.mbeans;
25
26 import javax.management.ObjectName JavaDoc;
27 import javax.management.MBeanServerConnection JavaDoc;
28
29 /**
30  * Provides for determining the state of servers within the
31  * scope of this domain
32  *
33  * @author Sreenivas Munnangi
34  */

35
36 public interface DomainStatusMBean {
37
38     /**
39      * attribute name for state
40      */

41     public static final String JavaDoc DOMAIN_STATUS_STATE = "state";
42
43     /**
44      * name of this mbean
45      */

46     public static final String JavaDoc DOMAIN_STATUS_PROPS = "name=domain-status";
47
48     /**
49      * type of the Notification emitted when the status of a server changes
50      */

51     public final String JavaDoc SERVER_STATUS_NOTIFICATION_TYPE =
52     "com.sun.appserv.management.status.ServerStatusChanged";
53
54     /**
55      * key within the Notification's Map of type
56      * SERVER_STATUS_NOTIFICATION_TYPE which yields the serverName
57      */

58     public final String JavaDoc SERVER_NAME_KEY = "ServerName";
59
60     // methods
61

62     /**
63      * get the current state of the given server
64      * @return Integer the current value of the state
65      */

66     public int getstate(String JavaDoc serverName) throws Exception JavaDoc;
67     
68     /**
69      * set the current state of the given server
70      */

71     public void setstate(String JavaDoc serverName, Integer JavaDoc state) throws Exception JavaDoc;
72     
73     /**
74      * get the mBean server connection for the given server
75      */

76     public MBeanServerConnection JavaDoc getServerMBeanServerConnection(String JavaDoc serverName) throws Exception JavaDoc;
77     
78 }
79
Popular Tags