use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.
the class BackupForResourceDefinition method register.
@Override
public void register(ManagementResourceRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
parentRegistration.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class);
ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new BackupForBuilder(address.getParent()));
new SimpleResourceRegistration(descriptor, handler).register(registration);
}
use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.
the class BackupResourceDefinition method register.
@Override
public void register(ManagementResourceRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(TakeOfflineAttribute.class);
new RestartParentResourceRegistration<>(this.parentBuilderFactory, descriptor).register(registration);
if (this.runtimeRegistration) {
new OperationHandler<>(new BackupOperationExecutor(), BackupOperation.class).register(registration);
}
}
use of org.jboss.as.controller.registry.ManagementResourceRegistration 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.registry.ManagementResourceRegistration in project wildfly by wildfly.
the class CoreAddressDefinition method registerChildren.
@Override
public void registerChildren(ManagementResourceRegistration registry) {
super.registerChildren(registry);
// TODO WFLY-5285 get rid of redundant .setRuntimeOnly once WFCORE-959 is integrated
ManagementResourceRegistration securityRole = registry.registerSubModel(SecurityRoleDefinition.RUNTIME_INSTANCE);
securityRole.setRuntimeOnly(true);
}
Aggregations