KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > gbean > GBeanLifecycleController


1 /**
2  *
3  * Copyright 2003-2004 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * 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.geronimo.gbean;
19
20 /**
21  * Context handle for a GBean which allows the bean to determin the current state, and to change the
22  * current state.
23  *
24  * @version $Rev: 151106 $ $Date: 2005-02-02 18:49:54 -0800 (Wed, 02 Feb 2005) $
25  */

26 public interface GBeanLifecycleController {
27     /**
28      * Gets the state of this component as an int.
29      * The int return is required by the JSR77 specification.
30      *
31      * @return the current state of this component
32      */

33     int getState();
34
35     /**
36      * Attempt to bring the component into the fully stopped state. If an exception occurs while
37      * stopping the component, tthe component is automaticaly failed.
38      * <p/>
39      * There is no guarantee that the Geronimo MBean will be stopped when the method returns.
40      *
41      * @throws Exception if a problem occurs while stopping the component
42      */

43     void stop() throws Exception JavaDoc;
44 }
45
Popular Tags