import javax.sql.DataSource;
public class Application extends AbstractComponent {
- private static final RequiredInterface[] REQUIRED =
+ private static RequiredInterface[] required() {
+ return
new RequiredInterface[] {
- new DefaultRequiredInterfaceDescriptor("datasource", DataSource.class),
- new DefaultRequiredInterfaceDescriptor("integer", Integer.class)
+ new DefaultRequiredInterface("datasource", DataSource.class),
+ new DefaultRequiredInterface("integer", Integer.class)
};
+ }
- public Application(ServiceRegistry aRegistry) {
- super("application", aRegistry, new ProvidedInterface[0], REQUIRED);
+ public Application() {
+ super("application", new ProvidedInterface[0], required());
}
@Override
- protected void doStart(String aContext, Service[] aRequiredServices) {
+ protected void doStart(String aContext) {
// Empty, no services provided externally.
}