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


Java GenericSubsystemDescribeHandler类代码示例

本文整理汇总了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);
}
 
开发者ID:RestComm,项目名称:smpp-extensions,代码行数:19,代码来源:SmppExtension.java

示例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;
}
 
开发者ID:hawkular,项目名称:hawkular-commons,代码行数:26,代码来源:NestSubsystemDefinition.java

示例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));
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:24,代码来源:AbstractLegacyExtension.java

示例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());
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:21,代码来源:SingletonResourceTestCase.java

示例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));
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:18,代码来源:AliasResourceTestCase.java

示例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);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:26,代码来源:DeploymentScannerExtension.java

示例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);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:21,代码来源:ValidateSubsystemExtension.java

示例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());
}
 
开发者ID:wildfly-extras,项目名称:wildfly-microprofile-config,代码行数:12,代码来源:SubsystemExtension.java

示例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);
}
 
开发者ID:jmesnil,项目名称:wildfly-microprofile-health,代码行数:9,代码来源:SubsystemExtension.java

示例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);
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:11,代码来源:Neo4jDriverExtension.java

示例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);
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:8,代码来源:OrientDriverExtension.java

示例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);
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:11,代码来源:CassandraDriverExtension.java

示例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);
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:11,代码来源:MongoDriverExtension.java

示例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);
}
 
开发者ID:panossot,项目名称:jam-metrics,代码行数:8,代码来源:JamMetricsExtension.java

示例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);
}
 
开发者ID:ncdc,项目名称:jboss-openshift-metrics-module,代码行数:9,代码来源:OpenShiftSubsystemExtension.java


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