KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > naming > NamingServiceMBean


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 package org.apache.naming;
19
20 /**
21  * Naming MBean interface.
22  *
23  * @author <a HREF="mailto:remm@apache.org">Remy Maucherat</a>
24  * @version $Revision: 467222 $
25  */

26
27 public interface NamingServiceMBean {
28     
29     
30     // -------------------------------------------------------------- Constants
31

32     
33     /**
34      * Status constants.
35      */

36     public static final String JavaDoc[] states =
37     {"Stopped", "Stopping", "Starting", "Started"};
38     
39     
40     public static final int STOPPED = 0;
41     public static final int STOPPING = 1;
42     public static final int STARTING = 2;
43     public static final int STARTED = 3;
44     
45     
46     /**
47      * Component name.
48      */

49     public static final String JavaDoc NAME = "Apache JNDI Naming Service";
50     
51     
52     /**
53      * Object name.
54      */

55     public static final String JavaDoc OBJECT_NAME = ":service=Naming";
56     
57     
58     // ------------------------------------------------------ Interface Methods
59

60     
61     /**
62      * Retruns the JNDI component name.
63      */

64     public String JavaDoc getName();
65     
66     
67     /**
68      * Returns the state.
69      */

70     public int getState();
71     
72     
73     /**
74      * Returns a String representation of the state.
75      */

76     public String JavaDoc getStateString();
77     
78     
79     /**
80      * Start the servlet container.
81      */

82     public void start()
83         throws Exception JavaDoc;
84     
85     
86     /**
87      * Stop the servlet container.
88      */

89     public void stop();
90     
91     
92     /**
93      * Destroy servlet container (if any is running).
94      */

95     public void destroy();
96     
97     
98 }
99
Popular Tags