01: /*
02: * Copyright 2004, 2005, 2006 Odysseus Software GmbH
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: package de.odysseus.calyxo.control;
17:
18: import de.odysseus.calyxo.control.conf.PluginConfig;
19:
20: /**
21: * Plugin interface.
22: * Plugins may be used to extend a module's capabilities.
23: * A plugin implementation requires a public default constructor.
24: * The plugin's <code>init()</code> (<code>destroy()</code>) method
25: * is called when the underlying module is initialized (destroyed).
26: *
27: * @see de.odysseus.calyxo.control.PluginContext
28: * @author Christoph Beck
29: */
30: public interface Plugin {
31: /**
32: * Initialize.
33: *
34: * @param config the plugin configuration
35: * @param context the plugin context we're in
36: * @throws Exception if something goes wrong.
37: */
38: public void init(PluginConfig config, PluginContext context)
39: throws Exception;
40:
41: /**
42: * Clean up.
43: */
44: public void destroy();
45: }
|