01: /*
02: * Copyright 1999,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.apache.naming;
18:
19: /**
20: * Naming MBean interface.
21: *
22: * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
23: * @version $Revision: 1.2 $
24: */
25:
26: public interface NamingServiceMBean {
27:
28: // -------------------------------------------------------------- Constants
29:
30: /**
31: * Status constants.
32: */
33: public static final String[] states = { "Stopped", "Stopping",
34: "Starting", "Started" };
35:
36: public static final int STOPPED = 0;
37: public static final int STOPPING = 1;
38: public static final int STARTING = 2;
39: public static final int STARTED = 3;
40:
41: /**
42: * Component name.
43: */
44: public static final String NAME = "Apache JNDI Naming Service";
45:
46: /**
47: * Object name.
48: */
49: public static final String OBJECT_NAME = ":service=Naming";
50:
51: // ------------------------------------------------------ Interface Methods
52:
53: /**
54: * Retruns the JNDI component name.
55: */
56: public String getName();
57:
58: /**
59: * Returns the state.
60: */
61: public int getState();
62:
63: /**
64: * Returns a String representation of the state.
65: */
66: public String getStateString();
67:
68: /**
69: * Start the servlet container.
70: */
71: public void start() throws Exception;
72:
73: /**
74: * Stop the servlet container.
75: */
76: public void stop();
77:
78: /**
79: * Destroy servlet container (if any is running).
80: */
81: public void destroy();
82:
83: }
|