1 /**
2 * $Id: ResourceManager.java 76 2006-12-15 21:33:49Z maldito_orco $
3 * $Revision: 76 $
4 * $Date: 2006-12-15 18:33:49 -0300 (Fri, 15 Dec 2006) $
5 *
6 * =========================================================================
7 *
8 * Copyright 2005 Tubo
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22 package org.tubo.resource;
23
24
25 import org.tubo.resource.consumer.ConsumerManager;
26 import org.tubo.resource.flow.FlowExecutor;
27 import org.tubo.resource.flow.FlowContext;
28 import org.tubo.resource.component.ComponentManager;
29 import org.tubo.configuration.def.Configuration;
30 import org.tubo.exception.ExceptionManager;
31 import org.tubo.exception.TuboException;
32 import org.tubo.item.Item;
33 import org.tubo.event.Event;
34 import org.tubo.kernel.Kernel;
35
36 import java.util.List;
37
38 /**
39 *
40 * Created: Jan 25, 2006 5:58:17 PM
41 * Last Modification Date: $Date: 2006-12-15 18:33:49 -0300 (Fri, 15 Dec 2006) $
42 *
43 * @author jvlio (jvlio@users.sourceforge.net)
44 * @version $Revision: 76 $
45 */
46 public interface ResourceManager {
47 public static final String RCS_ID = "$Id: ResourceManager.java 76 2006-12-15 21:33:49Z maldito_orco $";
48
49 /**
50 * Get the tubo configuration
51 * @return Configuration
52 */
53 Configuration getConfiguration() throws TuboException;
54
55 /**
56 * Create a new Item instance
57 * @return new Item instance
58 * @throws TuboException
59 */
60 Item getNewItem() throws TuboException;
61
62 /**
63 * Create a new Event instance
64 * @return new Event instance
65 * @throws TuboException
66 */
67 Event getNewEvent() throws TuboException;
68
69 /**
70 * Create a new FlowContext instance
71 * @return new FlowContext instance
72 * @throws TuboException
73 */
74 FlowContext getNewFlowContext() throws TuboException;
75
76 /**
77 * Get exception manager
78 * @return Exception manager
79 */
80 ExceptionManager getExceptionManager() throws TuboException;
81
82 /**
83 * Get flow processor manager
84 * @return Exception manager
85 */
86 FlowExecutor getFlowExecutor() throws TuboException;
87
88 /**
89 * Get a Manager identified by id
90 * @param id Manager identification
91 * @return A Manager
92 */
93 Manager getManager(String id) throws TuboException;
94
95 /**
96 * Get a ConsumerManager identified by id
97 * @param id manager id
98 * @return a ConsumerManager
99 */
100 ConsumerManager getConsumerManager(String id) throws TuboException;
101
102 /**
103 * Get the List of ConsumerManagers
104 * @return ConsumerManager's list
105 */
106 List getConsumerManagers() throws TuboException;
107
108 /**
109 * Get a ComponentManager identified by id
110 * @param id Manager identification
111 * @return a ComponentManager identified by id
112 */
113 ComponentManager getComponentManager(String id) throws TuboException;
114
115 /**
116 * <p>
117 * Get kernel instance
118 * </p>
119 * @return kernel instance
120 * @throws org.tubo.exception.TuboException
121 */
122 Kernel getKernel() throws TuboException;
123 }