- protected void doStart(String aContext, Service[] aRequiredServices) {
- List<ProvidedInterface> descriptors = new ArrayList<ProvidedInterface>();
- for (Service service : aRequiredServices) {
- descriptors.add(service.getDescriptor());
+ protected void doStart(String aContext) {
+ List<ProvidedInterface> provided = new ArrayList<ProvidedInterface>();
+
+ // all interfaces from the required list of this container are
+ // provided to the components inside it.
+ RequiredInterface[] required = getRequiredServices();
+ for (RequiredInterface intf: required) {
+ ProvidedInterface provider = intf.getProvider();
+ if ( provider == null ) {
+ throw new SystemAssemblyException(aContext + ": required interface '" + intf +"' is not provided");
+ }
+ provided.add(intf.getProvider());