Search in sources :

Example 26 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class JGroupsSubsystemResourceDefinition method register.

@Override
public void register(SubsystemRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubsystemModel(this);
    new DefaultSubsystemDescribeHandler().register(registration);
    //        registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addCapabilities(model -> model.hasDefined(Attribute.DEFAULT_CHANNEL.getName()), CAPABILITIES.values()).addCapabilities(model -> model.hasDefined(Attribute.DEFAULT_CHANNEL.getName()), CLUSTERING_CAPABILITIES.values());
    ResourceServiceHandler handler = new JGroupsSubsystemServiceHandler();
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    new ChannelResourceDefinition(this.allowRuntimeOnlyRegistration).register(registration);
    new StackResourceDefinition(this.allowRuntimeOnlyRegistration).register(registration);
}
Also used : DiscardAttributeChecker(org.jboss.as.controller.transform.description.DiscardAttributeChecker) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) SubsystemResourceDefinition(org.jboss.as.clustering.controller.SubsystemResourceDefinition) JGroupsRequirement(org.wildfly.clustering.jgroups.spi.JGroupsRequirement) SimpleAttributeDefinitionBuilder(org.jboss.as.controller.SimpleAttributeDefinitionBuilder) CapabilityReference(org.jboss.as.clustering.controller.CapabilityReference) AttributeAccess(org.jboss.as.controller.registry.AttributeAccess) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration) ResourceTransformationDescriptionBuilder(org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder) Map(java.util.Map) ModelVersion(org.jboss.as.controller.ModelVersion) DefaultSubsystemDescribeHandler(org.jboss.as.clustering.controller.DefaultSubsystemDescribeHandler) ModelDescriptionConstants(org.jboss.as.controller.descriptions.ModelDescriptionConstants) EnumSet(java.util.EnumSet) AttributeDefinition(org.jboss.as.controller.AttributeDefinition) CapabilityReferenceRecorder(org.jboss.as.controller.CapabilityReferenceRecorder) Capability(org.jboss.as.clustering.controller.Capability) EnumMap(java.util.EnumMap) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor) PathElement(org.jboss.as.controller.PathElement) TransformationDescription(org.jboss.as.controller.transform.description.TransformationDescription) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) ClusteringRequirement(org.wildfly.clustering.spi.ClusteringRequirement) TransformationDescriptionBuilder(org.jboss.as.controller.transform.description.TransformationDescriptionBuilder) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) RequirementCapability(org.jboss.as.clustering.controller.RequirementCapability) ModelType(org.jboss.dmr.ModelType) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) DefaultSubsystemDescribeHandler(org.jboss.as.clustering.controller.DefaultSubsystemDescribeHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 27 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class EeExtension method initialize.

/**
     * {@inheritDoc}
     */
@Override
public void initialize(ExtensionContext context) {
    final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    // Register the root subsystem resource.
    final ManagementResourceRegistration rootResource = subsystem.registerSubsystemModel(EeSubsystemRootResource.create());
    // Mandatory describe operation
    rootResource.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
    // register submodels
    rootResource.registerSubModel(ContextServiceResourceDefinition.INSTANCE);
    rootResource.registerSubModel(ManagedThreadFactoryResourceDefinition.INSTANCE);
    rootResource.registerSubModel(ManagedExecutorServiceResourceDefinition.INSTANCE);
    rootResource.registerSubModel(ManagedScheduledExecutorServiceResourceDefinition.INSTANCE);
    rootResource.registerSubModel(new DefaultBindingsResourceDefinition(new DefaultBindingsConfigurationProcessor()));
    subsystem.registerXMLElementWriter(EESubsystemXmlPersister.INSTANCE);
    if (context.isRegisterTransformers()) {
        registerTransformers(subsystem);
    }
}
Also used : ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) DefaultBindingsConfigurationProcessor(org.jboss.as.ee.component.deployers.DefaultBindingsConfigurationProcessor) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Example 28 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class WeldExtension method initialize.

/** {@inheritDoc} */
@Override
public void initialize(final ExtensionContext context) {
    WeldLogger.ROOT_LOGGER.debug("Activating Weld Extension");
    final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(WeldResourceDefinition.INSTANCE);
    registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
    subsystem.registerXMLElementWriter(WeldSubsystem40Parser.INSTANCE);
    if (context.isRegisterTransformers()) {
        registerTransformers(subsystem);
    }
}
Also used : ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Example 29 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class IDMExtension method initialize.

@Override
public void initialize(ExtensionContext context) {
    SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    subsystem.registerSubsystemModel(IDMSubsystemRootResourceDefinition.INSTANCE);
    subsystem.registerXMLElementWriter(Namespace.CURRENT.getXMLWriter());
    if (context.isRegisterTransformers()) {
        registerTransformers_1_0(context, subsystem);
    }
}
Also used : SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Example 30 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class FederationExtension method initialize.

@Override
public void initialize(ExtensionContext context) {
    SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    subsystemRegistration.registerSubsystemModel(new FederationSubsystemRootResourceDefinition(context));
    subsystemRegistration.registerXMLElementWriter(FederationSubsystemWriter.INSTANCE);
    if (context.isRegisterTransformers()) {
        registerTransformers_1_0(context, subsystemRegistration);
    }
}
Also used : SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Aggregations

SubsystemRegistration (org.jboss.as.controller.SubsystemRegistration)42 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)32 RequirementCapability (org.jboss.as.clustering.controller.RequirementCapability)3 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)3 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)3 SubsystemResourceDefinition (org.jboss.as.clustering.controller.SubsystemResourceDefinition)3 ModelVersion (org.jboss.as.controller.ModelVersion)3 PathElement (org.jboss.as.controller.PathElement)3 SimpleResourceDefinition (org.jboss.as.controller.SimpleResourceDefinition)3 ModelDescriptionConstants (org.jboss.as.controller.descriptions.ModelDescriptionConstants)3 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)3 TransformationDescription (org.jboss.as.controller.transform.description.TransformationDescription)3 TransformationDescriptionBuilder (org.jboss.as.controller.transform.description.TransformationDescriptionBuilder)3 EnumMap (java.util.EnumMap)2 EnumSet (java.util.EnumSet)2 Map (java.util.Map)2 CapabilityReference (org.jboss.as.clustering.controller.CapabilityReference)2 DeploymentChainContributingResourceRegistration (org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration)2 CapabilityReferenceRecorder (org.jboss.as.controller.CapabilityReferenceRecorder)2 ResourceDefinition (org.jboss.as.controller.ResourceDefinition)2