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


Java ServiceContainer.getRequiredService方法代码示例

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


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

示例1: lookupSecurityRealm

import org.jboss.msc.service.ServiceContainer; //导入方法依赖的package包/类
@Before
public void lookupSecurityRealm() {
    ServiceContainer container = getContainer();
    ServiceController<?> service = container.getRequiredService(SecurityRealm.ServiceUtil.createServiceName(TEST_REALM));

    securityRealm = (SecurityRealm) service.getValue();
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:8,代码来源:SecurityRealmTestBase.java

示例2: getAuthorizingCallbackHandler

import org.jboss.msc.service.ServiceContainer; //导入方法依赖的package包/类
private AuthorizingCallbackHandler getAuthorizingCallbackHandler(final String realmName) {
    SecurityRealm realm;
    if (TEST_REALM.equals(realmName)) {
        realm = securityRealm;
    } else {
        ServiceContainer container = getContainer();
        ServiceController<?> service = container.getRequiredService(SecurityRealm.ServiceUtil.createServiceName(realmName));

        realm = (SecurityRealm) service.getValue();
    }

    return realm.getAuthorizingCallbackHandler(AuthMechanism.PLAIN);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:14,代码来源:BaseLdapSuiteTest.java

示例3: startup

import org.jboss.msc.service.ServiceContainer; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public AsyncFuture<ServiceContainer> startup(Configuration configuration, List<ServiceActivator> extraServices) {
    try {
        ServiceContainer container = bootstrap(configuration, extraServices).get();
        ServiceController<?> controller = container.getRequiredService(Services.JBOSS_AS);
        return (AsyncFuture<ServiceContainer>) controller.getValue();
    } catch (Exception ex) {
        shutdownHook.shutdown(true);
        throw ServerLogger.ROOT_LOGGER.cannotStartServer(ex);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:13,代码来源:BootstrapImpl.java

示例4: getRequiredService

import org.jboss.msc.service.ServiceContainer; //导入方法依赖的package包/类
static <T> T getRequiredService(final ServiceContainer container, final ServiceName serviceName, Class<T> type) {
    final ServiceController<?> controller = container.getRequiredService(serviceName);
    return type.cast(controller.getValue());
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:5,代码来源:DomainServerMain.java

示例5: getDeploymentService

import org.jboss.msc.service.ServiceContainer; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private ProcessApplicationDeploymentService getDeploymentService(StartContext context, ServiceName deploymentServiceName) {
  final ServiceContainer serviceContainer = context.getController().getServiceContainer();
  ServiceController<ProcessApplicationDeploymentService> deploymentService = (ServiceController<ProcessApplicationDeploymentService>) serviceContainer.getRequiredService(deploymentServiceName);
  return deploymentService.getValue();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:7,代码来源:ProcessApplicationStartService.java


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