KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > lifecycle > Creator


1 /*
2  * Copyright 2003-2004 The Apache Software Foundation
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12  * implied.
13  *
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.avalon.lifecycle;
18
19 import org.apache.avalon.framework.context.Context;
20
21 /**
22  * The <code>Creator</code> interface describes the create and destroy
23  * stages that occur between a component and a container
24  * during service management. Lifecycle extensions supporting create
25  * and destroy stages must implement this interface.
26  *
27  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
28  * @version CVS $Revision: 1.3 $ $Date: 2004/02/28 11:47:19 $
29  */

30 public interface Creator
31 {
32     /**
33      * Create stage handler.
34      *
35      * @param object the object that is being created
36      * @param context the context instance required by the create handler
37      * implementation
38      * @exception Exception if an error occurs
39      */

40     void create( Object JavaDoc object, Context context )
41         throws Exception JavaDoc;
42
43     /**
44      * Destroy stage handler.
45      *
46      * @param object the object that is being destroyed
47      * @param context the context instance required by the handler
48      * implementation
49      */

50     void destroy( Object JavaDoc object, Context context );
51
52 }
53
Popular Tags