01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: // -------------------------------------------------------------- Constants
30:
31: /**
32: * Status constants.
33: */
34: public static final String[] states = { "Stopped", "Stopping",
35: "Starting", "Started" };
36:
37: public static final int STOPPED = 0;
38: public static final int STOPPING = 1;
39: public static final int STARTING = 2;
40: public static final int STARTED = 3;
41:
42: /**
43: * Component name.
44: */
45: public static final String NAME = "Apache JNDI Naming Service";
46:
47: /**
48: * Object name.
49: */
50: public static final String OBJECT_NAME = ":service=Naming";
51:
52: // ------------------------------------------------------ Interface Methods
53:
54: /**
55: * Retruns the JNDI component name.
56: */
57: public String getName();
58:
59: /**
60: * Returns the state.
61: */
62: public int getState();
63:
64: /**
65: * Returns a String representation of the state.
66: */
67: public String getStateString();
68:
69: /**
70: * Start the servlet container.
71: */
72: public void start() throws Exception;
73:
74: /**
75: * Stop the servlet container.
76: */
77: public void stop();
78:
79: /**
80: * Destroy servlet container (if any is running).
81: */
82: public void destroy();
83:
84: }
|