本文整理汇总了Java中org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler类的典型用法代码示例。如果您正苦于以下问题:Java GenericSubsystemDescribeHandler类的具体用法?Java GenericSubsystemDescribeHandler怎么用?Java GenericSubsystemDescribeHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GenericSubsystemDescribeHandler类属于org.jboss.as.controller.operations.common包,在下文中一共展示了GenericSubsystemDescribeHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem =
context.registerSubsystem(SUBSYSTEM_NAME, ModelVersion.create(MAJOR_VERSION, MINOR_VERSION));
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(SubsystemDefinition.INSTANCE);
final OperationDefinition describeOp = new SimpleOperationDefinitionBuilder(DESCRIBE,
getResourceDescriptionResolver(null))
.setEntryType(OperationEntry.EntryType.PRIVATE)
.build();
registration.registerOperationHandler(describeOp, GenericSubsystemDescribeHandler.INSTANCE, false);
subsystem.registerXMLElementWriter(SmppSubsystemParser.getInstance());
// here we can register submodels
final ManagementResourceRegistration mbeans = registration.registerSubModel(SmppMbeanDefinition.INSTANCE);
}
示例2: registerOperations
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
public void registerOperations(ManagementResourceRegistration rr) {
super.registerOperations(rr);
// We always need to add a 'describe' operation
rr.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION,
GenericSubsystemDescribeHandler.INSTANCE);
rr.registerOperationHandler(
new SimpleOperationDefinitionBuilder(NestSubsystemExtension.NEST_START_OP, NestSubsystemExtension
.getResourceDescriptionResolver(null))
.addParameter(START_OP_PARAM_RESTART).build(), NestSubsystemStart.INSTANCE);
rr.registerOperationHandler(
new SimpleOperationDefinitionBuilder(NestSubsystemExtension.NEST_STOP_OP, NestSubsystemExtension
.getResourceDescriptionResolver(null))
.build(), NestSubsystemStop.INSTANCE);
rr.registerOperationHandler(
new SimpleOperationDefinitionBuilder(NestSubsystemExtension.NEST_STATUS_OP, NestSubsystemExtension
.getResourceDescriptionResolver(null))
.build(), NestSubsystemStatus.INSTANCE);
return;
}
示例3: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
public void initialize(ExtensionContext context) {
if (context.getProcessType() == ProcessType.DOMAIN_SERVER) {
// Do nothing. This allows an extension=cmp:add op that's really targeted
// to legacy servers to work
ControllerLogger.MGMT_OP_LOGGER.ignoringUnsupportedLegacyExtension(subsystemNames, extensionName);
return;
} else if (context.getProcessType() == ProcessType.STANDALONE_SERVER) {
if (context.getRunningMode() == RunningMode.ADMIN_ONLY) {
//log a message, but fall through and register the model
ControllerLogger.MGMT_OP_LOGGER.removeUnsupportedLegacyExtension(subsystemNames, extensionName);
} else {
throw new UnsupportedOperationException(ControllerLogger.ROOT_LOGGER.unsupportedLegacyExtension(extensionName));
}
}
Set<ManagementResourceRegistration> subsystemRoots = initializeLegacyModel(context);
for (ManagementResourceRegistration subsystemRoot : subsystemRoots) {
subsystemRoot.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION,
new UnsupportedSubsystemDescribeHandler(extensionName));
}
}
示例4: initModel
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
protected void initModel(ManagementModel managementModel) {
ManagementResourceRegistration registration = managementModel.getRootResourceRegistration();
GlobalOperationHandlers.registerGlobalOperations(registration, processType);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
GlobalNotifications.registerGlobalNotifications(registration, processType);
ManagementResourceRegistration coreResourceRegistration = registration.registerSubModel(new CoreResourceDefinition());
coreResourceRegistration.registerSubModel(new ChildResourceDefinition(CHILD));
coreResourceRegistration.registerSubModel(new SingletonResourceDefinition(SERVICE, ASYNC));
coreResourceRegistration.registerSubModel(new SingletonResourceDefinition(SERVICE, REMOTE));
coreResourceRegistration.registerSubModel(new ChildResourceDefinition(DATASOURCE));
coreResourceRegistration.registerSubModel(new SingletonResourceDefinition(DATASOURCE, DS));
Resource model = Resource.Factory.create();
Resource rootResource = managementModel.getRootResource();
rootResource.registerChild(PathElement.pathElement(CORE, MODEL), model);
model.registerChild(PathElement.pathElement(CHILD, "myChild"), Resource.Factory.create());
}
示例5: initModel
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
protected void initModel(ManagementModel managementModel) {
ManagementResourceRegistration registration = managementModel.getRootResourceRegistration();
GlobalOperationHandlers.registerGlobalOperations(registration, processType);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
GlobalNotifications.registerGlobalNotifications(registration, processType);
ManagementResourceRegistration coreResourceRegistration = registration.registerSubModel(new CoreResourceDefinition(MODEL));
registration.registerAlias(PathElement.pathElement(ALIASED, MODEL), new TestAliasEntry(coreResourceRegistration));
ManagementResourceRegistration childReg = coreResourceRegistration.registerSubModel(new ChildResourceDefinition());
coreResourceRegistration.registerAlias(PathElement.pathElement(CHILD, KID_ALIASED), new TestAliasEntry(childReg));
registration.registerSubModel(new CoreResourceDefinition(OTHER));
}
示例6: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void initialize(ExtensionContext context) {
ROOT_LOGGER.debug("Initializing Deployment Scanner Extension");
if (context.getProcessType().isHostController()) {
throw DeploymentScannerLogger.ROOT_LOGGER.deploymentScannerNotForDomainMode();
}
final SubsystemRegistration subsystem = context.registerSubsystem(CommonAttributes.DEPLOYMENT_SCANNER, CURRENT_VERSION);
subsystem.registerXMLElementWriter(DeploymentScannerParser_2_0::new);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(new DeploymentScannerSubsystemDefinition());
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
final ManagementResourceRegistration scanner = registration.registerSubModel(new DeploymentScannerDefinition(context.getPathManager()));
if (context.getProcessType().isServer()) {
final ResolvePathHandler resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager())
.setRelativeToAttribute(DeploymentScannerDefinition.RELATIVE_TO)
.setPathAttribute(DeploymentScannerDefinition.PATH)
.build();
scanner.registerOperationHandler(resolvePathHandler.getOperationDefinition(), resolvePathHandler);
}
}
示例7: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, ModelVersion.create(1));
SimpleResourceDefinition subsystemResource = new SimpleResourceDefinition(new SimpleResourceDefinition.Parameters(
PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME),
new NonResolvingResourceDescriptionResolver())
);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(subsystemResource);
//We always need to add an 'add' operation
registration.registerOperationHandler(
SimpleOperationDefinitionBuilder.of(ADD, NonResolvingResourceDescriptionResolver.INSTANCE)
.setParameters(addAttributes)
.build(),
new AbstractAddStepHandler(addAttributes));
//We always need to add a 'describe' operation
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
示例8: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
subsystem.registerXMLElementWriter(SubsytemParser_1_0.INSTANCE);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(new SubsystemDefinition());
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
registration.registerSubModel(new ConfigSourceDefinition());
registration.registerSubModel(new ConfigSourceProviderDefinition());
}
示例9: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
subsystem.registerXMLElementWriter(SubsytemParser_1_0.INSTANCE);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(new SubsystemDefinition());
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
}
示例10: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(Neo4jDriverDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
示例11: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
public void initialize(ExtensionContext context) {
SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
ManagementResourceRegistration managementResource = subsystem.registerSubsystemModel(OrientDriverDefinition.INSTANCE);
managementResource.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION,
GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(OrientDriverSubsystemParser.INSTANCE);
}
示例12: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(CassandraDriverDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
示例13: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(MongoDriverDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
示例14: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION.getMajor(),CURRENT_MODEL_VERSION.getMicro(),CURRENT_MODEL_VERSION.getMinor());
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(JamMetricsRootDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE, false);
subsystem.registerXMLElementWriter(JamMetricsSubsystemParser_1_0.INSTANCE);
}
示例15: initialize
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; //导入依赖的package包/类
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, 1, 0);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(OpenShiftSubsystemDefinition.INSTANCE);
registration.registerOperationHandler(DESCRIBE, GenericSubsystemDescribeHandler.INSTANCE, GenericSubsystemDescribeHandler.INSTANCE, false, OperationEntry.EntryType.PRIVATE);
subsystem.registerXMLElementWriter(parser);
}