Search in sources :

Example 1 with DefaultBizDeployer

use of com.alipay.sofa.ark.container.service.biz.DefaultBizDeployer in project sofa-ark by alipay.

the class RegisterServiceStage method registryDefaultService.

/**
 * Registry some default service
 */
private void registryDefaultService() {
    /**
     * some basic container service is not allowed to be override,  they are only published
     * to be referenced by plugin and biz, even depended by other container service.
     */
    registryService.publishService(BizManagerService.class, ArkServiceContainerHolder.getContainer().getService(BizManagerService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(BizFactoryService.class, ArkServiceContainerHolder.getContainer().getService(BizFactoryService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(PluginManagerService.class, ArkServiceContainerHolder.getContainer().getService(PluginManagerService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(PluginFactoryService.class, ArkServiceContainerHolder.getContainer().getService(PluginFactoryService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(EventAdminService.class, ArkServiceContainerHolder.getContainer().getService(EventAdminService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(RegistryService.class, ArkServiceContainerHolder.getContainer().getService(RegistryService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    /**
     * some container service which may depends on other basic container service.
     */
    registryService.publishService(BizDeployer.class, new DefaultBizDeployer(), new ContainerServiceProvider());
    registryService.publishService(CommandProvider.class, new PluginCommandProvider(), PLUGIN_COMMAND_UNIQUE_ID, new ContainerServiceProvider());
    registryService.publishService(CommandProvider.class, new BizCommandProvider(), BIZ_COMMAND_UNIQUE_ID, new ContainerServiceProvider());
}
Also used : PluginManagerService(com.alipay.sofa.ark.spi.service.plugin.PluginManagerService) PluginFactoryService(com.alipay.sofa.ark.spi.service.plugin.PluginFactoryService) DefaultBizDeployer(com.alipay.sofa.ark.container.service.biz.DefaultBizDeployer) BizFactoryService(com.alipay.sofa.ark.spi.service.biz.BizFactoryService) EventAdminService(com.alipay.sofa.ark.spi.service.event.EventAdminService) ContainerServiceProvider(com.alipay.sofa.ark.container.registry.ContainerServiceProvider) PluginCommandProvider(com.alipay.sofa.ark.container.service.plugin.PluginCommandProvider) BizCommandProvider(com.alipay.sofa.ark.container.service.biz.BizCommandProvider) RegistryService(com.alipay.sofa.ark.spi.service.registry.RegistryService) BizManagerService(com.alipay.sofa.ark.spi.service.biz.BizManagerService)

Example 2 with DefaultBizDeployer

use of com.alipay.sofa.ark.container.service.biz.DefaultBizDeployer in project sofa-ark by sofastack.

the class RegisterServiceStage method registryDefaultService.

/**
 * Registry some default service
 */
private void registryDefaultService() {
    /**
     * some basic container service is not allowed to be override,  they are only published
     * to be referenced by plugin and biz, even depended by other container service.
     */
    registryService.publishService(BizManagerService.class, ArkServiceContainerHolder.getContainer().getService(BizManagerService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(BizFactoryService.class, ArkServiceContainerHolder.getContainer().getService(BizFactoryService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(PluginManagerService.class, ArkServiceContainerHolder.getContainer().getService(PluginManagerService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(PluginFactoryService.class, ArkServiceContainerHolder.getContainer().getService(PluginFactoryService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(EventAdminService.class, ArkServiceContainerHolder.getContainer().getService(EventAdminService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    registryService.publishService(RegistryService.class, ArkServiceContainerHolder.getContainer().getService(RegistryService.class), new ContainerServiceProvider(PriorityOrdered.HIGHEST_PRECEDENCE));
    /**
     * some container service which may depends on other basic container service.
     */
    registryService.publishService(BizDeployer.class, new DefaultBizDeployer(), new ContainerServiceProvider());
    registryService.publishService(CommandProvider.class, new PluginCommandProvider(), PLUGIN_COMMAND_UNIQUE_ID, new ContainerServiceProvider());
    registryService.publishService(CommandProvider.class, new BizCommandProvider(), BIZ_COMMAND_UNIQUE_ID, new ContainerServiceProvider());
}
Also used : PluginManagerService(com.alipay.sofa.ark.spi.service.plugin.PluginManagerService) PluginFactoryService(com.alipay.sofa.ark.spi.service.plugin.PluginFactoryService) DefaultBizDeployer(com.alipay.sofa.ark.container.service.biz.DefaultBizDeployer) BizFactoryService(com.alipay.sofa.ark.spi.service.biz.BizFactoryService) EventAdminService(com.alipay.sofa.ark.spi.service.event.EventAdminService) ContainerServiceProvider(com.alipay.sofa.ark.container.registry.ContainerServiceProvider) PluginCommandProvider(com.alipay.sofa.ark.container.service.plugin.PluginCommandProvider) BizCommandProvider(com.alipay.sofa.ark.container.service.biz.BizCommandProvider) RegistryService(com.alipay.sofa.ark.spi.service.registry.RegistryService) BizManagerService(com.alipay.sofa.ark.spi.service.biz.BizManagerService)

Aggregations

ContainerServiceProvider (com.alipay.sofa.ark.container.registry.ContainerServiceProvider)2 BizCommandProvider (com.alipay.sofa.ark.container.service.biz.BizCommandProvider)2 DefaultBizDeployer (com.alipay.sofa.ark.container.service.biz.DefaultBizDeployer)2 PluginCommandProvider (com.alipay.sofa.ark.container.service.plugin.PluginCommandProvider)2 BizFactoryService (com.alipay.sofa.ark.spi.service.biz.BizFactoryService)2 BizManagerService (com.alipay.sofa.ark.spi.service.biz.BizManagerService)2 EventAdminService (com.alipay.sofa.ark.spi.service.event.EventAdminService)2 PluginFactoryService (com.alipay.sofa.ark.spi.service.plugin.PluginFactoryService)2 PluginManagerService (com.alipay.sofa.ark.spi.service.plugin.PluginManagerService)2 RegistryService (com.alipay.sofa.ark.spi.service.registry.RegistryService)2