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 final RequiredInterfaceDescriptor[] REQUIRED =
+ new RequiredInterfaceDescriptor[] {
+ new DefaultRequiredInterfaceDescriptor("datasource", DataSource.class),
+ new DefaultRequiredInterfaceDescriptor("integer", Integer.class)
};
- public Application() {
- super("application", new ServiceDescriptor[0], REQUIRED);
+ public Application(ServiceRegistry aRegistry) {
+ super("application", aRegistry, new ProvidedInterfaceDescriptor[0], REQUIRED);
}
@Override
- protected void doInitialize(String aContext, Service[] aRequiredServices) {
+ protected void doStart(String aContext, Service[] aRequiredServices) {
// Empty, no services provided externally.
}
-
+
+ @Override
+ protected void doStop() {
+ // Empty.
+ }
}