(no commit message)
[utils] / system / general / src / test / java / org / wamblee / system / Application.java
index 77c76cb3120413b71163ad7af6a670b13480ec9e..6e9eb675c25861ae7d911109a7ec89c1c378039b 100644 (file)
@@ -2,20 +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() {
+               // Empty.       
+       }
 }