本文整理汇总了Java中org.jboss.as.controller.ServiceVerificationHandler类的典型用法代码示例。如果您正苦于以下问题:Java ServiceVerificationHandler类的具体用法?Java ServiceVerificationHandler怎么用?Java ServiceVerificationHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServiceVerificationHandler类属于org.jboss.as.controller包,在下文中一共展示了ServiceVerificationHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final String moduleId = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
_componentNames.add(moduleId);
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SwitchYardExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, _priority++, new SwitchYardModuleDependencyProcessor(moduleId));
}
}, OperationContext.Stage.RUNTIME);
final SwitchYardComponentService componentService = new SwitchYardComponentService(moduleId, model);
final ServiceBuilder<Component> componentServiceBuilder = context.getServiceTarget().addService(SwitchYardComponentService.SERVICE_NAME.append(moduleId), componentService);
componentServiceBuilder.addDependency(SwitchYardInjectorService.SERVICE_NAME, Map.class, componentService.getInjectedValues())
.addDependency(RA_REPOSITORY_SERVICE_NAME, ResourceAdapterRepository.class, componentService.getResourceAdapterRepository());
componentServiceBuilder.addDependency(WebSubsystemServices.JBOSS_WEB);
componentServiceBuilder.setInitialMode(Mode.ACTIVE);
newControllers.add(componentServiceBuilder.install());
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:21,代码来源:SwitchYardModuleAdd.java
示例2: performBoottime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void performBoottime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers)
throws OperationFailedException {
ModelNode fullModel = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
SmppService service = SmppService.INSTANCE;
service.setModel(fullModel);
ServiceName name = SmppService.getServiceName();
ServiceController<SmppServiceInterface> controller = context.getServiceTarget()
.addService(name, service)
.addDependency(PathManagerService.SERVICE_NAME, PathManager.class, service.getPathManagerInjector())
.addDependency(MBeanServerService.SERVICE_NAME, MBeanServer.class, service.getMbeanServer())
.addListener(verificationHandler)
.setInitialMode(ServiceController.Mode.ACTIVE)
.install();
newControllers.add(controller);
}
开发者ID:RestComm,项目名称:smpp-extensions,代码行数:23,代码来源:SubsystemAdd.java
示例3: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
MetricsService service = (MetricsService) context.getServiceRegistry(true).getRequiredService(MetricsService.getServiceName()).getValue();
final ModelNode address = operation.get(ModelDescriptionConstants.ADDRESS);
final String schedule = PathAddress.pathAddress(address).getElement(1).getValue();
final String sourcePath = PathAddress.pathAddress(address).getElement(2).getValue();
String type = SourceDefinition.TYPE.resolveModelAttribute(context,operation).asString();
final boolean enabled = MetricsGroupDefinition.ENABLED.resolveModelAttribute(context, operation).asBoolean();
final Source source = new Source(sourcePath, type, enabled);
final String cronExpression = Util.decodeCronExpression(schedule);
try {
service.addMetricSource(cronExpression, source);
} catch (Exception e) {
String message = MessageFormat.format("Encountered exception trying to add source[schedule={0}, path={1}]", cronExpression, source);
throw new OperationFailedException(message, e);
}
}
开发者ID:ncdc,项目名称:jboss-openshift-metrics-module,代码行数:18,代码来源:SourceAddHandler.java
示例4: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
MetricsService service = (MetricsService) context.getServiceRegistry(true).getRequiredService(MetricsService.getServiceName()).getValue();
String sourceKey = MetricDefinition.SOURCE_KEY.resolveModelAttribute(context, model).asString();
final String schedule = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getElement(1).getValue();
final String sourcePath = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getElement(2).getValue();
String publishKey = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getElement(3).getValue();
boolean enabled = MetricsGroupDefinition.ENABLED.resolveModelAttribute(context, operation).asBoolean();
final String cronExpression = Util.decodeCronExpression(schedule);
try {
service.addMetric(cronExpression, sourcePath, sourceKey, publishKey, enabled);
} catch (Exception e) {
String message = MessageFormat.format("Encountered exception trying to add metric[schedule={0}, source={1}, sourceKey={2}, publishKey={3}, enabled={4}]", cronExpression, sourcePath, sourceKey, publishKey, enabled);
throw new OperationFailedException(message, e);
}
}
开发者ID:ncdc,项目名称:jboss-openshift-metrics-module,代码行数:17,代码来源:MetricAddHandler.java
示例5: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
ModelNode subsystemConfig = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
// TODO: the root resource doesn't inlcude the runtime paramters, hence we cannot depict the host/server name & launch-type from it.
//ModelNode systemConfig = Resource.Tools.readModel(context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS, false));
// Add the service
newControllers.add(
RhqMetricsService.createService(
context.getServiceTarget(),
verificationHandler,
subsystemConfig
)
);
}
开发者ID:hawkular,项目名称:wildfly-monitor,代码行数:18,代码来源:SubsystemAdd.java
示例6: createService
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
public static ServiceController<RhqMetricsService> createService(final ServiceTarget target,
final ServiceVerificationHandler verificationHandler,
ModelNode config) {
RhqMetricsService service = new RhqMetricsService(config);
return target.addService(SERVICE_NAME, service)
.addDependency(ServerEnvironmentService.SERVICE_NAME, ServerEnvironment.class,
service.serverEnvironmentValue)
.addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class,
service.modelControllerValue)
.addDependency(ControlledProcessStateService.SERVICE_NAME, ControlledProcessStateService.class,
service.processStateValue)
.addListener(verificationHandler)
.setInitialMode(ServiceController.Mode.ACTIVE)
.install();
}
开发者ID:hawkular,项目名称:wildfly-monitor,代码行数:18,代码来源:RhqMetricsService.java
示例7: installRuntimeServices
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
static void installRuntimeServices(OperationContext context, PathAddress address, ModelNode fullModel,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> controllers)
throws OperationFailedException {
String clusterName = address.getLastElement().getValue();
final Config serviceConfig = createServiceConfig(context, address, fullModel);
CassandraService service = new CassandraService(clusterName, serviceConfig);
ServiceController<CassandraService> controller = context.getServiceTarget()
.addService(SERVICE_NAME, service)
.addListener(verificationHandler)
.setInitialMode(ServiceController.Mode.ACTIVE)
.addDependency(PathManagerService.SERVICE_NAME, PathManager.class, service.getPathManagerInjector())
.install();
controllers.add(controller);
}
开发者ID:hawkular,项目名称:wildfly-cassandra,代码行数:18,代码来源:ClusterAdd.java
示例8: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers)
throws OperationFailedException {
if (!operation.hasDefined(THREAD_POOL_NAME)) {
throw new ProcessEngineException("Unable to configure threadpool for ContainerJobExecutorService, missing element '" + THREAD_POOL_NAME + "' in JobExecutor configuration.");
}
String jobExecutorThreadPoolName = operation.get(THREAD_POOL_NAME).asString();
MscExecutorService service = new MscExecutorService();
ServiceController<MscExecutorService> serviceController = context.getServiceTarget().addService(ServiceNames.forMscExecutorService(), service)
.addDependency(ThreadsServices.EXECUTOR.append(jobExecutorThreadPoolName), ManagedQueueExecutorService.class, service.getManagedQueueInjector())
.addListener(verificationHandler)
.setInitialMode(Mode.ACTIVE)
.install();
newControllers.add(serviceController);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:22,代码来源:JobExecutorAdd.java
示例9: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers)
throws OperationFailedException {
String jobExecutorThreadPoolName = SubsystemAttributeDefinitons.THREAD_POOL_NAME.resolveModelAttribute(context, model).asString();
ServiceName jobExecutorThreadPoolServiceName = ServiceNames.forManagedThreadPool(jobExecutorThreadPoolName);
performRuntimeThreadPool(context, model, jobExecutorThreadPoolName, jobExecutorThreadPoolServiceName, verificationHandler, newControllers);
MscExecutorService service = new MscExecutorService();
ServiceController<MscExecutorService> serviceController = context.getServiceTarget().addService(ServiceNames.forMscExecutorService(), service)
.addDependency(jobExecutorThreadPoolServiceName, ManagedQueueExecutorService.class, service.getManagedQueueInjector())
.addListener(verificationHandler)
.setInitialMode(Mode.ACTIVE)
.install();
newControllers.add(serviceController);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:21,代码来源:JobExecutorAdd.java
示例10: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
String moduleId = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
ServiceName serviceName = SwitchYardSecurityConfigService.SERVICE_NAME.append(moduleId);
SwitchYardSecurityConfigService securityConfigService = new SwitchYardSecurityConfigService(moduleId, model);
ServiceBuilder<SecurityConfig> securityConfigServiceBuilder = context.getServiceTarget().addService(serviceName, securityConfigService);
securityConfigServiceBuilder.addDependency(SwitchYardSystemSecurityService.SERVICE_NAME, SystemSecurity.class, securityConfigService.getSystemSecurity());
securityConfigServiceBuilder.addDependency(SwitchYardInjectorService.SERVICE_NAME, Map.class, securityConfigService.getInjectedValues());
securityConfigServiceBuilder.setInitialMode(Mode.ACTIVE);
newControllers.add(securityConfigServiceBuilder.install());
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:13,代码来源:SwitchYardSecurityConfigAdd.java
示例11: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
final String moduleId = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
_extensionNames.add(moduleId);
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SwitchYardExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, SwitchYardModuleAdd._priority++, new SwitchYardModuleDependencyProcessor(moduleId));
}
}, OperationContext.Stage.RUNTIME);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:13,代码来源:SwitchYardExtensionAdd.java
示例12: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
MetricsService service = (MetricsService) context.getServiceRegistry(true).getRequiredService(MetricsService.getServiceName()).getValue();
ModelNode address = operation.require(OP_ADDR);
String schedule = PathAddress.pathAddress(address).getLastElement().getValue();
boolean enabled = MetricsGroupDefinition.ENABLED.resolveModelAttribute(context, operation).asBoolean();
final String cronExpression = Util.decodeCronExpression(schedule);
try {
service.createJob(cronExpression, enabled);
} catch (Exception e) {
String message = MessageFormat.format("Encountered exception trying to add metrics group[schedule={0}]", cronExpression);
throw new OperationFailedException(message, e);
}
}
开发者ID:ncdc,项目名称:jboss-openshift-metrics-module,代码行数:15,代码来源:MetricsGroupAddHandler.java
示例13: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> controllers)
throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
ModelNode fullTree = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
installRuntimeServices(context, address, fullTree, verificationHandler, controllers);
}
开发者ID:mp911de,项目名称:logstash-gelf-subsystem,代码行数:10,代码来源:DatenpumpeAdd.java
示例14: performBoottime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void performBoottime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers)
throws OperationFailedException {
}
开发者ID:mp911de,项目名称:logstash-gelf-subsystem,代码行数:9,代码来源:SubsystemAdd.java
示例15: install
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
public ServiceController<Void> install(ServiceTarget serviceTarget, ServiceVerificationHandler verificationHandler) {
ServiceBuilder<Void> builder = serviceTarget.addService(FabricConstants.FABRIC_SUBSYSTEM_SERVICE_NAME, this);
builder.addDependency(GraviaConstants.MODULE_CONTEXT_SERVICE_NAME, ModuleContext.class, injectedModuleContext);
builder.addDependency(GraviaConstants.RUNTIME_SERVICE_NAME, Runtime.class, injectedRuntime);
builder.addListener(verificationHandler);
return builder.install();
}
开发者ID:tdiesler,项目名称:fabric8poc,代码行数:8,代码来源:FabricBootstrapService.java
示例16: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler,
List<ServiceController<?>> newControllers) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
ModelNode fullTree = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
}
开发者ID:hawkular,项目名称:wildfly-monitor,代码行数:10,代码来源:StorageAdd.java
示例17: performBoottime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler,
List<ServiceController<?>> newControllers) throws OperationFailedException {
// register deployers if needed
}
开发者ID:hawkular,项目名称:wildfly-cassandra,代码行数:9,代码来源:RootAdd.java
示例18: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> controllers)
throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
ModelNode fullTree = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
installRuntimeServices(context, address, fullTree, verificationHandler, controllers);
}
开发者ID:hawkular,项目名称:wildfly-cassandra,代码行数:13,代码来源:ClusterAdd.java
示例19: performRuntime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model,
ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers)
throws OperationFailedException {
String acquisitionName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
MscRuntimeContainerJobExecutor mscRuntimeContainerJobExecutor = new MscRuntimeContainerJobExecutor();
if (model.hasDefined(PROPERTIES)) {
List<Property> properties = model.get(PROPERTIES).asPropertyList();
for (Property property : properties) {
String name = property.getName();
String value = property.getValue().asString();
PropertyHelper.applyProperty(mscRuntimeContainerJobExecutor, name, value);
}
}
// start new service for job executor
ServiceController<RuntimeContainerJobExecutor> serviceController = context.getServiceTarget().addService(ServiceNames.forMscRuntimeContainerJobExecutorService(acquisitionName), mscRuntimeContainerJobExecutor)
.addDependency(ServiceNames.forMscRuntimeContainerDelegate())
.addDependency(ServiceNames.forMscExecutorService())
.addListener(verificationHandler)
.setInitialMode(Mode.ACTIVE)
.install();
newControllers.add(serviceController);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:33,代码来源:JobAcquisitionAdd.java
示例20: performBoottime
import org.jboss.as.controller.ServiceVerificationHandler; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler,
List<ServiceController< ? >> newControllers) throws OperationFailedException {
// add deployment processors
context.addStep(new AbstractDeploymentChainStep() {
public void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.PARSE, ProcessApplicationProcessor.PRIORITY, new ProcessApplicationProcessor());
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.DEPENDENCIES, ModuleDependencyProcessor.PRIORITY, new ModuleDependencyProcessor());
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.POST_MODULE, ProcessesXmlProcessor.PRIORITY, new ProcessesXmlProcessor());
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.INSTALL, ProcessEngineStartProcessor.PRIORITY, new ProcessEngineStartProcessor());
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.INSTALL, ProcessApplicationDeploymentProcessor.PRIORITY, new ProcessApplicationDeploymentProcessor());
}
}, OperationContext.Stage.RUNTIME);
// create and register the MSC container delegate.
final MscRuntimeContainerDelegate processEngineService = new MscRuntimeContainerDelegate();
final ServiceController<MscRuntimeContainerDelegate> controller = context.getServiceTarget()
.addService(ServiceNames.forMscRuntimeContainerDelegate(), processEngineService)
.addListener(verificationHandler)
.setInitialMode(Mode.ACTIVE)
.install();
newControllers.add(controller);
// discover and register bpm platform plugins
BpmPlatformPlugins plugins = BpmPlatformPlugins.load(getClass().getClassLoader());
MscBpmPlatformPlugins managedPlugins = new MscBpmPlatformPlugins(plugins);
ServiceController<BpmPlatformPlugins> serviceController = context.getServiceTarget()
.addService(ServiceNames.forBpmPlatformPlugins(), managedPlugins)
.addListener(verificationHandler)
.setInitialMode(Mode.ACTIVE)
.install();
newControllers.add(serviceController);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:40,代码来源:BpmPlatformSubsystemAdd.java
注:本文中的org.jboss.as.controller.ServiceVerificationHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论