use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class RoutingProviderResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addCapabilities(Capability.class);
ResourceServiceHandler handler = new SimpleResourceServiceHandler(this.serviceConfiguratorFactory);
new SimpleResourceRegistration(descriptor, handler).register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class SSOManagementResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addCapabilities(Capability.class);
ResourceServiceHandler handler = new SimpleResourceServiceHandler(this.serviceConfiguratorFactory);
new SimpleResourceRegistration(descriptor, handler).register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class SessionManagementResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addAttributes(Attribute.class).addCapabilities(Capability.class);
ResourceServiceHandler handler = new SimpleResourceServiceHandler(this.factory);
new SimpleResourceRegistration(descriptor, handler).register(registration);
new NoAffinityResourceDefinition().register(registration);
new LocalAffinityResourceDefinition().register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class ModClusterSubsystemResourceDefinition method register.
@SuppressWarnings("deprecation")
@Override
public void register(SubsystemRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubsystemModel(this);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver());
ServiceValueExecutorRegistry<ModClusterServiceMBean> registry = new ServiceValueExecutorRegistry<>();
ResourceServiceHandler handler = new ModClusterSubsystemServiceHandler(registry);
new SimpleResourceRegistration(descriptor, handler).register(registration);
new ProxyConfigurationResourceDefinition(registry).register(registration);
// Deprecated legacy operations which are exposed at the wrong location
if (parent.isRuntimeOnlyRegistrationValid()) {
new LegacyProxyHandler(registry).register(registration);
}
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class SSLResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addExtraParameters(Attribute.class);
for (Attribute attribute : Attribute.values()) {
registration.registerReadWriteAttribute(attribute.getDefinition(), null, new ReloadRequiredWriteAttributeHandler() {
@Override
protected void validateUpdatedModel(OperationContext context, Resource model) {
context.addStep(new OperationStepHandler() {
@Override
public void execute(OperationContext ctx, ModelNode op) throws OperationFailedException {
final ModelNode conf = ctx.readResourceFromRoot(ctx.getCurrentAddress().getParent(), false).getModel();
if (conf.hasDefined(ProxyConfigurationResourceDefinition.Attribute.SSL_CONTEXT.getName())) {
throw new OperationFailedException(ROOT_LOGGER.bothElytronAndLegacySslContextDefined());
}
}
}, OperationContext.Stage.MODEL);
}
});
}
new ReloadRequiredResourceRegistration(descriptor).register(registration);
return registration;
}
Aggregations