当前位置: 首页>>代码示例>>Java>>正文


Java StartContext.getChildTarget方法代码示例

本文整理汇总了Java中org.jboss.msc.service.StartContext.getChildTarget方法的典型用法代码示例。如果您正苦于以下问题:Java StartContext.getChildTarget方法的具体用法?Java StartContext.getChildTarget怎么用?Java StartContext.getChildTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.msc.service.StartContext的用法示例。


在下文中一共展示了StartContext.getChildTarget方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import org.jboss.msc.service.StartContext; //导入方法依赖的package包/类
@Override
public void start(StartContext context) throws StartException {
    ServiceTarget target = context.getChildTarget();

    ClientService clientService = new ClientService();
    target.addService(ClientService.SERVICE_NAME, clientService)
            .install();

    NamespaceService namespaceService = new NamespaceService();
    target.addService(NamespaceService.SERVICE_NAME, namespaceService)
            .addDependency(ClientService.SERVICE_NAME, IClient.class, namespaceService.getClientInjector())
            .install();

    ServiceWatcher watcher = new ServiceWatcher();
    target.addService(ServiceWatcher.SERVICE_NAME, watcher)
            .addDependency(ClientService.SERVICE_NAME, IClient.class, watcher.getClientInjector())
            .addDependency(NamespaceService.SERVICE_NAME, String.class, watcher.getNamespaceInjector())
            .addDependency(TopologyManagerActivator.SERVICE_NAME, TopologyManager.class, watcher.getTopologyManagerInjector())
            .install();
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:21,代码来源:OpenShiftTopologyConnector.java

示例2: start

import org.jboss.msc.service.StartContext; //导入方法依赖的package包/类
@Override
public void start(StartContext startContext) throws StartException {
    ServiceTarget target = startContext.getChildTarget();

    CatalogWatcher watcher = new CatalogWatcher();
    target.addService(CatalogWatcher.SERVICE_NAME, watcher)
            .addDependency(CatalogClientService.SERVICE_NAME, CatalogClient.class, watcher.getCatalogClientInjector())
            .addDependency(HealthClientService.SERIVCE_NAME, HealthClient.class, watcher.getHealthClientInjector())
            .addDependency(TopologyManager.SERVICE_NAME, TopologyManager.class, watcher.getTopologyManagerInjector())
            .install();


}
 
开发者ID:wildfly-swarm-archive,项目名称:wildfly-swarm-topology-consul,代码行数:14,代码来源:ConsulTopologyConnector.java

示例3: start

import org.jboss.msc.service.StartContext; //导入方法依赖的package包/类
@Override
public void start(StartContext startContext) throws StartException {
    ServiceTarget target = startContext.getChildTarget();

    CatalogWatcher watcher = new CatalogWatcher();
    target.addService(CatalogWatcher.SERVICE_NAME, watcher)
            .addDependency(CatalogClientService.SERVICE_NAME, CatalogClient.class, watcher.getCatalogClientInjector())
            .addDependency(HealthClientService.SERIVCE_NAME, HealthClient.class, watcher.getHealthClientInjector())
            .addDependency(TopologyManagerActivator.SERVICE_NAME, TopologyManager.class, watcher.getTopologyManagerInjector())
            .install();


}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:14,代码来源:ConsulTopologyConnector.java

示例4: start

import org.jboss.msc.service.StartContext; //导入方法依赖的package包/类
@Override
public void start(StartContext startContext) throws StartException {
    ServiceTarget target = startContext.getChildTarget();

    ConsulService consul = new ConsulService(this.url);
    target.addService(ConsulService.SERVICE_NAME, consul)
            .install();

    HealthClientService healthClient = new HealthClientService();
    target.addService(HealthClientService.SERIVCE_NAME, healthClient)
            .addDependency(ConsulService.SERVICE_NAME, Consul.class, healthClient.getConsulInjector())
            .install();

    AgentClientService agentClient = new AgentClientService();
    target.addService(AgentClientService.SERVICE_NAME, agentClient)
            .addDependency(ConsulService.SERVICE_NAME, Consul.class, agentClient.getConsulInjector())
            .install();

    CatalogClientService catalogClient = new CatalogClientService();
    target.addService(CatalogClientService.SERVICE_NAME, catalogClient)
            .addDependency(ConsulService.SERVICE_NAME, Consul.class, catalogClient.getConsulInjector())
            .install();


    this.advertiser = new Advertiser();
    target.addService(Advertiser.SERVICE_NAME, advertiser)
            .addDependency(AgentClientService.SERVICE_NAME, AgentClient.class, advertiser.getAgentClientInjector())
            .install();

    CatalogWatcher watcher = new CatalogWatcher();
    target.addService(CatalogWatcher.SERVICE_NAME, watcher)
            .addDependency(CatalogClientService.SERVICE_NAME, CatalogClient.class, watcher.getCatalogClientInjector())
            .addDependency(HealthClientService.SERIVCE_NAME, HealthClient.class, watcher.getHealthClientInjector())
            .addDependency(TopologyManager.SERVICE_NAME, TopologyManager.class, watcher.getTopologyManagerInjector())
            .install();
}
 
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:37,代码来源:ConsulTopologyConnector.java

示例5: start

import org.jboss.msc.service.StartContext; //导入方法依赖的package包/类
public synchronized void start(StartContext context) throws StartException {
    log.debugf("Starting Arquillian Test Runner");

    final MBeanServer mbeanServer = injectedMBeanServer.getValue();
    try {
        jmxTestRunner = new ExtendedJMXTestRunner();
        jmxTestRunner.registerMBean(mbeanServer);
    } catch (Throwable t) {
        throw new StartException("Failed to start Arquillian Test Runner", t);
    }

    listener = new ArquillianServiceListener(context.getChildTarget());
    context.getController().getServiceContainer().addListener(listener);
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:15,代码来源:ArquillianService.java

示例6: start

import org.jboss.msc.service.StartContext; //导入方法依赖的package包/类
public void start(StartContext context) throws StartException {		
	ServiceTarget serviceTarget = context.getChildTarget();
	ServiceBuilder<B> builder = serviceTarget.addService(B.NAME, new B());
	builder.install();
}
 
开发者ID:jbosschina,项目名称:wildfly-dev-cookbook,代码行数:6,代码来源:HierarchyService.java


注:本文中的org.jboss.msc.service.StartContext.getChildTarget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。