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);
}
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);
}
}
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);
}
}
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);
}
}
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);
}
}
Aggregations