@Override public void start(StartContext context) throws StartException { this.resource = new ApplicationSubscriptionsResource( this.subscriptionManagerInjector.getValue(), this.vertxInjector.getValue(), this.codecManagerInjector.getValue()); MountService<ApplicationSubscriptionsResource> mount = new MountService<>(); ServiceTarget target = context.getChildTarget(); String appId = this.app.id(); target.addService(context.getController().getName().append("mount"), mount) .addDependency(Services.applicationContext(appId), MountPointResource.class, mount.mountPointInjector()) .addInjectionValue(mount.resourceInjector(), this) .install(); }
.addDependency(Services.applicationContext(ZeroExtension.APPLICATION_ID), MountPointResource.class, mount.mountPointInjector()) .addDependency(systemName, RootResource.class, mount.resourceInjector()) .install(); .addDependency(Services.applicationContext(ZeroExtension.APPLICATION_ID), MountPointResource.class, mediaTypeMount.mountPointInjector()) .addDependency(applicationsName, RootResource.class, mediaTypeMount.resourceInjector()) .install(); .addDependency(Services.applicationContext(ZeroExtension.APPLICATION_ID), MountPointResource.class, localAppMediaTypeMount.mountPointInjector()) .addDependency(localApplicationsName, RootResource.class, localAppMediaTypeMount.resourceInjector()) .install(); .addDependency(Services.applicationContext(ZeroExtension.APPLICATION_ID), MountPointResource.class, gitAppMediaTypeMount.mountPointInjector()) .addDependency(gitApplicationsName, RootResource.class, gitAppMediaTypeMount.resourceInjector()) .install(); .addDependency(Services.applicationContext(ZeroExtension.APPLICATION_ID), MountPointResource.class, templateAppMediaTypeMount.mountPointInjector()) .addDependency(templateApplicationName, RootResource.class, templateAppMediaTypeMount.resourceInjector()) .install();
.install(); ServiceName appContextName = Services.applicationContext(this.id);
@Override public void start(StartContext context) throws StartException { log.debug("** Activate " + this.extensionId + " as " + resourceId + " for " + this.applicationInjector.getValue().id()); ServiceTarget target = context.getChildTarget(); this.appExtension = new InternalApplicationExtension( this.serviceRegistryInjector.getValue(), this.applicationInjector.getValue(), this.extensionId, this.resourceId ); String appId = this.appExtension.application().id(); this.extensionContext = new ApplicationExtensionContextImpl( target, this.appExtension, Services.applicationContext(appId), Services.applicationAdminResource(appId).append("extensions"), this.configuration, this.boottime); try { this.extensionInjector.getValue().extend(extensionContext); if (this.appExtension.exception() != null) { throw this.appExtension.exception(); } } catch (Exception e) { throw new StartException(e); } }