KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > treeprocessor > ProcessingNodeBuilder


1 /*
2  * Copyright 1999-2004 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 package org.apache.cocoon.components.treeprocessor;
17
18 import org.apache.avalon.framework.component.Component;
19 import org.apache.avalon.framework.configuration.Configuration;
20
21 /**
22  * A <code>ProcessingNode</code> builder.
23  * <p>
24  * Lifecycle information : a <code>TreeBuilder</code> can be recycled
25  * and used to build several <code>Processor</code>s, each one defining
26  * a different <code>ComponentManager</code>. As a consequence, a
27  * <code>ProcessingNodeBuilder</code> that needs access to the
28  * <code>ComponentManager</code> of the <code>Processor</code> being
29  * built must be not only <code>Composable</code> but also
30  * <strong><code>Recomposable</code></strong>.
31  * <p>
32  * Note however that being <code>Recomposable</code> doesn't forbid to be
33  * <code>ThreadSafe</code> since a <code>ProcessingNodeBuilder</code> is
34  * used by only one <code>TreeBuilder</code> at a time.
35  *
36  * @author <a HREF="mailto:sylvain@apache.org">Sylvain Wallez</a>
37  * @version CVS $Id: ProcessingNodeBuilder.java 30932 2004-07-29 17:35:38Z vgritsenko $
38  */

39
40 public interface ProcessingNodeBuilder extends Component {
41
42     /**
43      * Set the builder for which we are building.
44      */

45     void setBuilder(TreeBuilder builder);
46
47     /**
48      * Build the {@link ProcessingNode} and its children from the given
49      * <code>Configuration</code>, and optionnaly register it in the tree builder
50      * for lookup by other <code>LinkedProcessingNodeBuilder</code>s.
51      */

52     ProcessingNode buildNode(Configuration config) throws Exception JavaDoc;
53 }
54
Popular Tags