01: /*--------------------------------------------------------------------------*
02: | Copyright (C) 2006 Christopher Kohlhaas |
03: | |
04: | This program is free software; you can redistribute it and/or modify |
05: | it under the terms of the GNU General Public License as published by the |
06: | Free Software Foundation. A copy of the license has been included with |
07: | these distribution in the COPYING file, if not go to www.fsf.org |
08: | |
09: | As a special exception, you are granted the permissions to link this |
10: | program with every library, which license fulfills the Open Source |
11: | Definition as published by the Open Source Initiative (OSI). |
12: *--------------------------------------------------------------------------*/
13: package org.rapla.framework;
14:
15: import java.util.Collection;
16: import java.util.Map;
17:
18: import org.apache.avalon.framework.configuration.Configuration;
19:
20: public interface Container {
21: String ROLE = Container.class.getName();
22:
23: StartupEnvironment getStartupEnvironment();
24:
25: void addContainerProvidedComponentInstance(String role,
26: Object component);
27:
28: void addContainerProvidedComponent(String role, String classname);
29:
30: void addContainerProvidedComponent(String role, String classname,
31: String hint, Configuration config);
32:
33: RaplaContext getContext();
34:
35: /** returns a set with all hints to the services*/
36: Collection getAllServicesFor(String role);
37:
38: /** lookup all services for this role (grouped by their hint)*/
39: Map lookupServicesFor(String role) throws RaplaContextException;
40: }
|