use of org.jboss.as.controller.SimpleOperationDefinitionBuilder in project wildfly by wildfly.
the class AbstractActiveMQComponentControlHandler method registerOperations.
public void registerOperations(final ManagementResourceRegistration registry, final ResourceDescriptionResolver resolver) {
final OperationDefinition startOp = new SimpleOperationDefinitionBuilder(START, resolver).build();
registry.registerOperationHandler(startOp, this);
final OperationDefinition stopOp = new SimpleOperationDefinitionBuilder(STOP, resolver).build();
registry.registerOperationHandler(stopOp, this);
}
use of org.jboss.as.controller.SimpleOperationDefinitionBuilder in project wildfly by wildfly.
the class WebMigrateOperation method registerOperations.
static void registerOperations(ManagementResourceRegistration registry, ResourceDescriptionResolver resourceDescriptionResolver) {
registry.registerOperationHandler(new SimpleOperationDefinitionBuilder(MIGRATE, resourceDescriptionResolver).setRuntimeOnly().setAccessConstraints(SensitiveTargetAccessConstraintDefinition.READ_WHOLE_CONFIG).setReplyParameters(MIGRATION_WARNINGS_ATTR, MIGRATION_ERROR_ATTR).build(), WebMigrateOperation.MIGRATE_INSTANCE);
registry.registerOperationHandler(new SimpleOperationDefinitionBuilder(DESCRIBE_MIGRATION, resourceDescriptionResolver).setRuntimeOnly().setAccessConstraints(SensitiveTargetAccessConstraintDefinition.READ_WHOLE_CONFIG).setReplyParameters(MIGRATION_WARNINGS_ATTR).build(), WebMigrateOperation.DESCRIBE_MIGRATION_INSTANCE);
}
use of org.jboss.as.controller.SimpleOperationDefinitionBuilder in project wildfly by wildfly.
the class AddressSettingsResolveHandler method registerOperationHandler.
public static void registerOperationHandler(ManagementResourceRegistration registry, ResourceDescriptionResolver resolver) {
SimpleOperationDefinition op = new SimpleOperationDefinitionBuilder(RESOLVE_ADDRESS_SETTING, resolver).withFlags(EnumSet.of(OperationEntry.Flag.READ_ONLY, OperationEntry.Flag.RUNTIME_ONLY)).addParameter(ACTIVEMQ_ADDRESS).setReplyType(ModelType.LIST).setReplyParameters(AddressSettingDefinition.ATTRIBUTES).build();
registry.registerOperationHandler(op, AddressSettingsResolveHandler.INSTANCE);
}
use of org.jboss.as.controller.SimpleOperationDefinitionBuilder in project wildfly by wildfly.
the class ClusterConnectionDefinition method registerOperations.
@Override
public void registerOperations(ManagementResourceRegistration registry) {
super.registerOperations(registry);
ClusterConnectionControlHandler.INSTANCE.registerOperations(registry, getResourceDescriptionResolver());
final EnumSet<OperationEntry.Flag> flags = EnumSet.of(OperationEntry.Flag.READ_ONLY, OperationEntry.Flag.RUNTIME_ONLY);
SimpleOperationDefinition getNodesDef = new SimpleOperationDefinitionBuilder(ClusterConnectionDefinition.GET_NODES, getResourceDescriptionResolver()).withFlags(flags).setReplyType(OBJECT).setReplyValueType(STRING).build();
registry.registerOperationHandler(getNodesDef, ClusterConnectionControlHandler.INSTANCE);
}
use of org.jboss.as.controller.SimpleOperationDefinitionBuilder in project wildfly by wildfly.
the class BroadcastGroupDefinition method registerOperations.
@Override
public void registerOperations(ManagementResourceRegistration registry) {
super.registerOperations(registry);
BroadcastGroupControlHandler.INSTANCE.registerOperations(registry, getResourceDescriptionResolver());
SimpleOperationDefinition op = new SimpleOperationDefinitionBuilder(GET_CONNECTOR_PAIRS_AS_JSON, getResourceDescriptionResolver()).withFlags(EnumSet.of(OperationEntry.Flag.READ_ONLY, OperationEntry.Flag.RUNTIME_ONLY)).setReplyType(STRING).build();
registry.registerOperationHandler(op, BroadcastGroupControlHandler.INSTANCE);
}
Aggregations