Search in sources :

Example 6 with SimpleOperationDefinition

use of org.jboss.as.controller.SimpleOperationDefinition 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);
}
Also used : SimpleOperationDefinitionBuilder(org.jboss.as.controller.SimpleOperationDefinitionBuilder) SimpleOperationDefinition(org.jboss.as.controller.SimpleOperationDefinition)

Example 7 with SimpleOperationDefinition

use of org.jboss.as.controller.SimpleOperationDefinition 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);
}
Also used : SimpleOperationDefinitionBuilder(org.jboss.as.controller.SimpleOperationDefinitionBuilder) SimpleOperationDefinition(org.jboss.as.controller.SimpleOperationDefinition)

Example 8 with SimpleOperationDefinition

use of org.jboss.as.controller.SimpleOperationDefinition 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);
}
Also used : SimpleOperationDefinitionBuilder(org.jboss.as.controller.SimpleOperationDefinitionBuilder) SimpleOperationDefinition(org.jboss.as.controller.SimpleOperationDefinition)

Aggregations

SimpleOperationDefinition (org.jboss.as.controller.SimpleOperationDefinition)8 SimpleOperationDefinitionBuilder (org.jboss.as.controller.SimpleOperationDefinitionBuilder)4 AttributeDefinition (org.jboss.as.controller.AttributeDefinition)1 OperationContext (org.jboss.as.controller.OperationContext)1 OperationStepHandler (org.jboss.as.controller.OperationStepHandler)1 SimpleAttributeDefinitionBuilder (org.jboss.as.controller.SimpleAttributeDefinitionBuilder)1 ModelNode (org.jboss.dmr.ModelNode)1 ModelType (org.jboss.dmr.ModelType)1