(no commit message)
[utils] / system / general / src / test / java / org / wamblee / system / Application.java
index 3587917b93e98653d2bd95294e770c505477896d..6e9eb675c25861ae7d911109a7ec89c1c378039b 100644 (file)
@@ -2,24 +2,26 @@ package org.wamblee.system;
 
 import javax.sql.DataSource;
 
-public class Application extends AbstractSubSystem {
-       private static final ServiceDescriptor[] REQUIRED = 
-               new ServiceDescriptor[] { 
-                       new DefaultServiceDescriptor(DataSource.class), 
-                       new DefaultServiceDescriptor(Integer.class)
+public class Application extends AbstractComponent {
+       private static RequiredInterface[] required() {
+               return
+               new RequiredInterface[] { 
+                       new DefaultRequiredInterface("datasource", DataSource.class), 
+                       new DefaultRequiredInterface("integer", Integer.class)
        };
+       }
        
        public Application() {
-               super("application", new ServiceDescriptor[0], REQUIRED); 
+               super("application", new ProvidedInterface[0], required()); 
        }
 
        @Override
-       protected void doStart(String aContext, ServiceRegistry aRegistry, Service[] aRequiredServices) {
+       protected void doStart(String aContext) {
                // Empty, no services provided externally. 
        }
        
        @Override
-       protected void doStop(String aContext) {
+       protected void doStop() {
                // Empty.       
        }
 }