本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}