本文整理汇总了Java中org.jboss.as.server.DeploymentProcessorTarget类的典型用法代码示例。如果您正苦于以下问题:Java DeploymentProcessorTarget类的具体用法?Java DeploymentProcessorTarget怎么用?Java DeploymentProcessorTarget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DeploymentProcessorTarget类属于org.jboss.as.server包,在下文中一共展示了DeploymentProcessorTarget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performRuntime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的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());
}
示例2: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void performBoottime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
MicroProfileConfigLogger.ROOT_LOGGER.activatingSubsystem();
ConfigProviderService.install(context);
//Add deployment processors here
//Remove this if you don't need to hook into the deployers, or you can add as many as you like
//see SubDeploymentProcessor for explanation of the phases
context.addStep(new AbstractDeploymentChainStep() {
public void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SubsystemExtension.SUBSYSTEM_NAME, DependencyProcessor.PHASE, DependencyProcessor.PRIORITY, new DependencyProcessor());
processorTarget.addDeploymentProcessor(SubsystemExtension.SUBSYSTEM_NAME, SubsystemDeploymentProcessor.PHASE, SubsystemDeploymentProcessor.PRIORITY, new SubsystemDeploymentProcessor());
}
}, OperationContext.Stage.RUNTIME);
}
示例3: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) throws
OperationFailedException {
runtimeValidator.validate(operation.resolve());
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
final int PARSE_NEO4J_DRIVER = 0x4C00;
final int DEPENDENCIES_NEO4J_DRIVER = 0x1F10;
// TODO: use Phase.PARSE_NEO4J_DRIVER
processorTarget.addDeploymentProcessor(Neo4jDriverExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_NEO4J_DRIVER, new DriverScanDependencyProcessor("neo4jsubsystem"));
// TODO: use Phase.DEPENDENCIES_NEO4J_DRIVER
processorTarget.addDeploymentProcessor(Neo4jDriverExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_NEO4J_DRIVER, DriverDependencyProcessor.getInstance());
}
}, OperationContext.Stage.RUNTIME);
startNeo4jDriverSubsysteService(context);
}
示例4: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model)
throws OperationFailedException {
runtimeValidator.validate(operation.resolve());
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
final int PARSE_ORIENT_DRIVER = 0x4C01;
final int DEPENDENCIES_ORIENT_DRIVER = 0x1F11;
// TODO: use Phase.PARSE_ORIENT_DRIVER
processorTarget.addDeploymentProcessor(OrientDriverExtension.SUBSYSTEM_NAME, Phase.PARSE,
PARSE_ORIENT_DRIVER, new DriverScanDependencyProcessor("orientdbsubsystem"));
// TODO: use Phase.DEPENDENCIES_ORIENT_DRIVER
processorTarget.addDeploymentProcessor(OrientDriverExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES,
DEPENDENCIES_ORIENT_DRIVER, DriverDependencyProcessor.getInstance());
}
}, OperationContext.Stage.RUNTIME);
startOrientSubsystemService(context);
}
示例5: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) throws
OperationFailedException {
runtimeValidator.validate(operation.resolve());
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
final int PARSE_CASSANDRA_DRIVER = 0x4C02;
final int DEPENDENCIES_CASSANDRA_DRIVER = 0x1F12;
// TODO: use Phase.PARSE_CASSANDRA_DRIVER
processorTarget.addDeploymentProcessor(CassandraDriverExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_CASSANDRA_DRIVER, new DriverScanDependencyProcessor("cassandrasubsystem"));
// TODO: use Phase.DEPENDENCIES_CASSANDRA_DRIVER
processorTarget.addDeploymentProcessor(CassandraDriverExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_CASSANDRA_DRIVER, DriverDependencyProcessor.getInstance());
}
}, OperationContext.Stage.RUNTIME);
startCassandraDriverSubsysteService(context);
}
示例6: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) throws
OperationFailedException {
runtimeValidator.validate(operation.resolve());
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
final int PARSE_MONGO_DRIVER = 0x4C03;
final int DEPENDENCIES_MONGO_DRIVER = 0x1F13;
// TODO: use Phase.PARSE_MONGO_DRIVER
processorTarget.addDeploymentProcessor(MongoDriverExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_MONGO_DRIVER, new DriverScanDependencyProcessor("mongodbsubsystem"));
// TODO: use Phase.DEPENDENCIES_MONGO_DRIVER
processorTarget.addDeploymentProcessor(MongoDriverExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_MONGO_DRIVER, DriverDependencyProcessor.getInstance());
}
}, OperationContext.Stage.RUNTIME);
startMongoDriverSubsysteService(context);
}
示例7: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
@Override
protected void performBoottime(OperationContext context, ModelNode operation, final ModelNode model) throws OperationFailedException {
context.addStep(new AbstractDeploymentChainStep() {
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
// processorTarget.addDeploymentProcessor(jam-metricsExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_AUTOMATED_METRICS, new jam-metricsDependencyProcessor());
processorTarget.addDeploymentProcessor(JamMetricsExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_METRIC, new JamMetricsDependencyProcessor());
// processorTarget.addDeploymentProcessor(jam-metricsExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_METRIC, new jam-metricsInterceptorProcessor());
processorTarget.addDeploymentProcessor(JamMetricsExtension.SUBSYSTEM_NAME, Phase.INSTALL, Phase.INSTALL_METRIC_VALIDATOR_FACTORY, new JamMetricsBeanValidationFactoryProcessor());
}
}, OperationContext.Stage.RUNTIME);
// jam-metricsLogger.ROOT_LOGGER.startedjam-metricsSubsystem();
/* ServiceTarget target = context.getServiceTarget();
target.addService(jam-metricsServices.AUTOMATED_METRICS, new jam-metricsServices())
.setInitialMode(ServiceController.Mode.ACTIVE)
.install();*/
}
示例8: performRuntime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) 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.setInitialMode(Mode.ACTIVE);
componentServiceBuilder.install();
}
示例9: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void performBoottime(OperationContext context, ModelNode operation, final Resource resource)
throws OperationFailedException {
context.addStep(new AbstractDeploymentChainStep() {
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(RequestControllerExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_GLOBAL_REQUEST_CONTROLLER, new RequestControllerDeploymentUnitProcessor());
}
}, OperationContext.Stage.RUNTIME);
int maxRequests = RequestControllerRootDefinition.MAX_REQUESTS.resolveModelAttribute(context, resource.getModel()).asInt();
boolean trackIndividual = RequestControllerRootDefinition.TRACK_INDIVIDUAL_ENDPOINTS.resolveModelAttribute(context, resource.getModel()).asBoolean();
RequestController requestController = new RequestController(trackIndividual);
requestController.setMaxRequestCount(maxRequests);
context.getServiceTarget().addService(RequestController.SERVICE_NAME, requestController)
.addDependency(SuspendController.SERVICE_NAME, SuspendController.class, requestController.getShutdownControllerInjectedValue())
.install();
}
示例10: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
@Override
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model)
throws OperationFailedException {
final Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS);
final ModelNode node = Resource.Tools.readModel(resource);
// get the minimum set of deployment permissions.
final ModelNode deploymentPermissionsModel = node.get(DEPLOYMENT_PERMISSIONS_PATH.getKeyValuePair());
final ModelNode minimumPermissionsNode = MINIMUM_PERMISSIONS.resolveModelAttribute(context, deploymentPermissionsModel);
final List<PermissionFactory> minimumSet = this.retrievePermissionSet(context, minimumPermissionsNode);
// get the maximum set of deployment permissions.
ModelNode maximumPermissionsNode = MAXIMUM_PERMISSIONS.resolveModelAttribute(context, deploymentPermissionsModel);
if (!maximumPermissionsNode.isDefined())
maximumPermissionsNode = DEFAULT_MAXIMUM_SET;
final List<PermissionFactory> maximumSet = this.retrievePermissionSet(context, maximumPermissionsNode);
// validate the configured permissions - the minimum set must be implied by the maximum set.
final FactoryPermissionCollection maxPermissionCollection = new FactoryPermissionCollection(maximumSet.toArray(new PermissionFactory[maximumSet.size()]));
final StringBuilder failedPermissions = new StringBuilder();
for (PermissionFactory factory : minimumSet) {
Permission permission = factory.construct();
if (!maxPermissionCollection.implies(permission)) {
failedPermissions.append("\n\t\t").append(permission);
}
}
if (failedPermissions.length() > 0) {
throw SecurityManagerLogger.ROOT_LOGGER.invalidSubsystemConfiguration(failedPermissions);
}
// install the DUPs responsible for parsing and validating security permissions found in META-INF/permissions.xml.
context.addStep(new AbstractDeploymentChainStep() {
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(Constants.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_PERMISSIONS,
new PermissionsParserProcessor(minimumSet));
processorTarget.addDeploymentProcessor(Constants.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_PERMISSIONS_VALIDATION,
new PermissionsValidationProcessor(maximumSet));
}
}, OperationContext.Stage.RUNTIME);
}
示例11: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void performBoottime(OperationContext context, ModelNode operation, Resource resource)
throws OperationFailedException {
//Add deployment processors here
//Remove this if you don't need to hook into the deployers, or you can add as many as you like
//see SubDeploymentProcessor for explanation of the phases
context.addStep(new AbstractDeploymentChainStep() {
public void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SimpleSubsystemExtension.SUBSYSTEM_NAME, SimpleSubsystemDeploymentProcessor.PHASE, SimpleSubsystemDeploymentProcessor.PRIORITY, new SimpleSubsystemDeploymentProcessor());
}
}, OperationContext.Stage.RUNTIME);
context.getServiceTarget().addService(SimpleService.NAME, new SimpleService()).install();
}
示例12: execute
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
DbBootstrapLogger.ROOT_LOGGER.tracef("%s:'%s'", DbBootstrapExtension.FILENAME_ATTR, filename);
try {
String subsystemName = DbBootstrapExtension.SUBSYSTEM_NAME;
int priority = Phase.FIRST_MODULE_USE_PERSISTENCE_CLASS_FILE_TRANSFORMER - priorityDelta.getAndIncrement();
DbBootstrapScanDetectorProcessor processor;
processor = new DbBootstrapScanDetectorProcessor(filename, new HibernateBootstrapProvider());
processorTarget.addDeploymentProcessor(subsystemName, Phase.FIRST_MODULE_USE, priority, processor);
} catch (Exception e) {
DbBootstrapLogger.ROOT_LOGGER.error("Error when executing db-bootstrap deployment chain step", e);
}
}
示例13: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
@Override
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
final List<String> blacklist = JarBlackListResourceDefinition.JAR_NAMES.unwrap(context,model);
context.addStep(new AbstractDeploymentChainStep() {
@Override
protected void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SDDExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_WEB_DEPLOYMENT, new JarBlackListDetectorProcessor(blacklist));
}
}, OperationContext.Stage.RUNTIME);
}
示例14: performBoottime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void performBoottime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
MicroProfileHealthLogger.ROOT_LOGGER.activatingSubsystem();
HealthMonitorService.install(context);
String serverName = HTTP_SERVER.resolveModelAttribute(context, model).asString();
String vHostName = HTTP_VIRTUAL_HOST.resolveModelAttribute(context, model).asString();
ModelNode path = HTTP_PATH.resolveModelAttribute(context, model);
if (path.isDefined()) {
HealthHttpHandlerService.install(context, serverName, vHostName, path.asString());
}
/*
HealthCheckHelper.install(context, "heap-memory", () -> {
MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
long memUsed = memoryBean.getHeapMemoryUsage().getUsed();
long memMax = memoryBean.getHeapMemoryUsage().getMax();
Response response = Response.named("heap-memory")
.withAttribute("used", memUsed)
.withAttribute("max", memMax)
// response is is down is used memory is greater than 90% of max memory.
.state((memUsed < memMax * 0.9) ? true : false);
return response;
});
*/
//Add deployment processors here
//Remove this if you don't need to hook into the deployers, or you can add as many as you like
//see SubDeploymentProcessor for explanation of the phases
context.addStep(new AbstractDeploymentChainStep() {
public void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(SubsystemExtension.SUBSYSTEM_NAME, DependencyProcessor.PHASE, DependencyProcessor.PRIORITY, new DependencyProcessor());
processorTarget.addDeploymentProcessor(SubsystemExtension.SUBSYSTEM_NAME, SubsystemDeploymentProcessor.PHASE, SubsystemDeploymentProcessor.PRIORITY, new SubsystemDeploymentProcessor());
}
}, OperationContext.Stage.RUNTIME);
}
示例15: performRuntime
import org.jboss.as.server.DeploymentProcessorTarget; //导入依赖的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);
}