KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > excalibur > event > command > EventPipeline


1 /*
2  * Copyright 1999-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
18 package org.apache.excalibur.event.command;
19
20 import org.apache.excalibur.event.EventHandler;
21 import org.apache.excalibur.event.Source;
22
23 /**
24  * An EventPipeline is used by the ThreadManager to manage the event Queue
25  * and EventHandler relationship. The ThreadManager manages the automatic
26  * forwarding of the Events from the queue to the Event Handler.
27  *
28  * <p>
29  * The interface design is heavily influenced by
30  * <a HREF="mailto:mdw@cs.berkeley.edu">Matt Welsh</a>'s SandStorm server,
31  * his demonstration of the SEDA architecture. We have deviated where we
32  * felt the design differences where better.
33  * </p>
34  *
35  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
36  */

37 public interface EventPipeline
38 {
39     /**
40      * There can be many different sources to merge into a pipeline. For the
41      * CommandManager, there is only one sink.
42      *
43      * @return the array of sources that feed the handler
44      */

45     Source[] getSources();
46
47     /**
48      * Returns the reference to the EventHandler that the events from all the
49      * Sinks get merged into.
50      *
51      * @return the handler for the pipeline
52      */

53     EventHandler getEventHandler();
54 }
55
Popular Tags