KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > modules > Module


1 /*
2  * Copyright 2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.axis2.modules;
18
19 import org.apache.axis2.engine.AxisConfiguration;
20 import org.apache.axis2.engine.AxisFault;
21
22 /**
23  * Every module provides an implementation of this class. Modules are in one of
24  * three states: "available" and "initialized". All modules that the runtime
25  * detects (from the system modules/ directory or from other means) are said to
26  * be in the "available" state. If some service indicates a dependency on this
27  * module then the module is initialized (once for the life of the system) and
28  * the state changes to "initialized".
29  *
30  * <p/>Any module which is in the "initialized" state can be engaged as needed
31  * by the engine to respond to a message. Currently module engagement is done
32  * via deployment (using module.xml). In the future we may engage modules
33  * programmatically by introducing an engage() method to this interface, thereby
34  * allowing more dynamic scenarios.
35  */

36 public interface Module {
37     // initialize the module
38
public void init(AxisConfiguration axisSystem) throws AxisFault;
39
40     // TODO figure out how to get the engage() concept done
41
// public void engage(ExecutionChain exeChain) throws AxisFault;
42

43     // shutdown the module
44
public void shutdown(AxisConfiguration axisSystem) throws AxisFault;
45 }
46
Popular Tags