rename subsystem to component.
[utils] / system / spring / src / main / java / org / wamblee / system / spring / SpringSystem.java
index 5b7bfce62391a534fc5fc7a9f549910a4e512612..7a8b513ee7b318129f1b643c89a9096d3d7e30fa 100644 (file)
@@ -10,12 +10,12 @@ import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.context.support.GenericApplicationContext;
-import org.wamblee.system.AbstractSubSystem;
+import org.wamblee.system.AbstractComponent;
 import org.wamblee.system.CompositeSystem;
-import org.wamblee.system.ProvidedServiceDescriptor;
-import org.wamblee.system.RequiredServiceDescriptor;
+import org.wamblee.system.ProvidedInterfaceDescriptor;
+import org.wamblee.system.RequiredInterfaceDescriptor;
 import org.wamblee.system.Service;
-import org.wamblee.system.ServiceDescriptor;
+import org.wamblee.system.InterfaceDescriptor;
 import org.wamblee.system.ServiceRegistry;
 import org.wamblee.system.SystemAssembler;
 import org.wamblee.system.SystemAssemblyException;
@@ -25,7 +25,7 @@ import org.wamblee.system.SystemAssemblyException;
  *
  * @author Erik Brakkee
  */
-public class SpringSystem extends AbstractSubSystem {
+public class SpringSystem extends AbstractComponent {
 
        /**
         * Singleton access to the service registry. Required while starting up.
@@ -33,8 +33,8 @@ public class SpringSystem extends AbstractSubSystem {
        static ThreadLocal<ServiceRegistry> REGISTRY = new ThreadLocal<ServiceRegistry>();
 
        private String[] _configFiles;
-       private Map<String, ProvidedServiceDescriptor> _provided;
-       private Map<RequiredServiceDescriptor, String> _required;
+       private Map<String, ProvidedInterfaceDescriptor> _provided;
+       private Map<RequiredInterfaceDescriptor, String> _required;
        /**
         * Parent application context containing required services.
         */
@@ -62,10 +62,10 @@ public class SpringSystem extends AbstractSubSystem {
         *            service.
         */
        public SpringSystem(String aName, ServiceRegistry aRegistry, String[] aConfigFiles,
-                       Map<String, ProvidedServiceDescriptor> aProvided,
-                       Map<RequiredServiceDescriptor, String> aRequired) {
-               super(aName, aRegistry, aProvided.values().toArray(new ServiceDescriptor[0]),
-                               aRequired.keySet().toArray(new ServiceDescriptor[0]));
+                       Map<String, ProvidedInterfaceDescriptor> aProvided,
+                       Map<RequiredInterfaceDescriptor, String> aRequired) {
+               super(aName, aRegistry, aProvided.values().toArray(new InterfaceDescriptor[0]),
+                               aRequired.keySet().toArray(new InterfaceDescriptor[0]));
                _configFiles = aConfigFiles;
                _provided = aProvided;
                _required = aRequired;
@@ -121,10 +121,10 @@ public class SpringSystem extends AbstractSubSystem {
                
                for (Service svc: aRequiredServices) { 
                        String id = svc.getId();
-                       ProvidedServiceDescriptor descriptor = svc.getDescriptor();
-                       RequiredServiceDescriptor[] requiredServices = SystemAssembler.filterRequiredServices(descriptor,
+                       ProvidedInterfaceDescriptor descriptor = svc.getDescriptor();
+                       RequiredInterfaceDescriptor[] requiredServices = SystemAssembler.filterRequiredServices(descriptor,
                                        _required.keySet()); 
-                       for (RequiredServiceDescriptor required: requiredServices) { 
+                       for (RequiredInterfaceDescriptor required: requiredServices) { 
                                String beanName = _required.get(required);
                                ConstructorArgumentValues cargs = new ConstructorArgumentValues();
                                cargs.addGenericArgumentValue(id);