Search in sources :

Example 1 with SubsystemRegistration

use of org.jboss.as.clustering.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);
    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()).setAddOperationTransformation(new AddOperationTransformer());
    ResourceServiceHandler handler = new JGroupsSubsystemServiceHandler();
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    new ChannelResourceDefinition().register(registration);
    new StackResourceDefinition().register(registration);
}
Also used : OperationStepHandler(org.jboss.as.controller.OperationStepHandler) 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) UnaryOperator(java.util.function.UnaryOperator) CapabilityReference(org.jboss.as.clustering.controller.CapabilityReference) AttributeAccess(org.jboss.as.controller.registry.AttributeAccess) OperationContext(org.jboss.as.controller.OperationContext) SubsystemRegistration(org.jboss.as.clustering.controller.SubsystemRegistration) Util(org.jboss.as.controller.operations.common.Util) Map(java.util.Map) DefaultSubsystemDescribeHandler(org.jboss.as.clustering.controller.DefaultSubsystemDescribeHandler) ModelDescriptionConstants(org.jboss.as.controller.descriptions.ModelDescriptionConstants) EnumSet(java.util.EnumSet) AttributeDefinition(org.jboss.as.controller.AttributeDefinition) Capability(org.jboss.as.clustering.controller.Capability) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) EnumMap(java.util.EnumMap) PathAddress(org.jboss.as.controller.PathAddress) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor) PathElement(org.jboss.as.controller.PathElement) ClusteringRequirement(org.wildfly.clustering.spi.ClusteringRequirement) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) OperationFailedException(org.jboss.as.controller.OperationFailedException) ModelNode(org.jboss.dmr.ModelNode) RequirementCapability(org.jboss.as.clustering.controller.RequirementCapability) ModelType(org.jboss.dmr.ModelType) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) DefaultSubsystemDescribeHandler(org.jboss.as.clustering.controller.DefaultSubsystemDescribeHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Aggregations

EnumMap (java.util.EnumMap)1 EnumSet (java.util.EnumSet)1 Map (java.util.Map)1 UnaryOperator (java.util.function.UnaryOperator)1 Capability (org.jboss.as.clustering.controller.Capability)1 CapabilityReference (org.jboss.as.clustering.controller.CapabilityReference)1 DefaultSubsystemDescribeHandler (org.jboss.as.clustering.controller.DefaultSubsystemDescribeHandler)1 ManagementResourceRegistration (org.jboss.as.clustering.controller.ManagementResourceRegistration)1 RequirementCapability (org.jboss.as.clustering.controller.RequirementCapability)1 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)1 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)1 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)1 SubsystemRegistration (org.jboss.as.clustering.controller.SubsystemRegistration)1 SubsystemResourceDefinition (org.jboss.as.clustering.controller.SubsystemResourceDefinition)1 AttributeDefinition (org.jboss.as.controller.AttributeDefinition)1 OperationContext (org.jboss.as.controller.OperationContext)1 OperationFailedException (org.jboss.as.controller.OperationFailedException)1 OperationStepHandler (org.jboss.as.controller.OperationStepHandler)1 PathAddress (org.jboss.as.controller.PathAddress)1 PathElement (org.jboss.as.controller.PathElement)1