Package org.jboss.as.controller

Examples of org.jboss.as.controller.OperationDefinition


                throw ControllerMessages.MESSAGES.nullVar("pathManager");
            }
            if (operationName == null) {
                throw ControllerMessages.MESSAGES.nullVar("operationName");
            }
            final OperationDefinition operationDefinition = new SimpleOperationDefinitionBuilder(operationName, new ResolvePathResourceDescriptionResolver(operationName))
                    .addParameter(ResolvePathHandler.RELATIVE_TO_ONLY)
                    .setReplyType(ModelType.STRING)
                    .build();
            return new Builder(operationDefinition, pathManager);
        }
View Full Code Here


    }

    @Override
    public void registerOperations(ManagementResourceRegistration resourceRegistration) {
        super.registerOperations(resourceRegistration);
        final OperationDefinition probe = new SimpleOperationDefinitionBuilder(LogStoreConstants.PROBE, getResourceDescriptionResolver())
                                .setRuntimeOnly()
                                .setReadOnly()
                                .build();
        resourceRegistration.registerOperationHandler(probe, LogStoreProbeHandler.INSTANCE);
    }
View Full Code Here

    public void registerAttributes(final ManagementResourceRegistration registry) {
        registry.registerReadOnlyAttribute(STARTED, this);
    }

    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);
    }
View Full Code Here

        }
    }

    @Override
    public void registerOperations(ManagementResourceRegistration registry) {
        OperationDefinition rolesAsJsonDef = new SimpleOperationDefinitionBuilder(GET_ROLES_AS_JSON, getResourceDescriptionResolver())
                .setReplyType(STRING)
                .withFlags(EnumSet.of(OperationEntry.Flag.READ_ONLY))
                .build();
        registry.registerOperationHandler(rolesAsJsonDef, AddressControlHandler.INSTANCE);
        super.registerOperations(registry);
View Full Code Here

    public void registerOperations(ManagementResourceRegistration resourceRegistration) {
        super.registerOperations(resourceRegistration);

        final ResourceDescriptionResolver rootResolver = getResourceDescriptionResolver();

        final OperationDefinition addMetricDef = new SimpleOperationDefinitionBuilder(CommonAttributes.ADD_METRIC, rootResolver)
                .setParameters(LoadMetricDefinition.ATTRIBUTES)
                .setRuntimeOnly()
                .build();
        final OperationDefinition addCustomDef = new SimpleOperationDefinitionBuilder(CommonAttributes.ADD_CUSTOM_METRIC, rootResolver)
                .setParameters(CustomLoadMetricDefinition.ATTRIBUTES)
                .setRuntimeOnly()
                .build();
        final OperationDefinition removeMetricDef = new SimpleOperationDefinitionBuilder(CommonAttributes.REMOVE_METRIC, rootResolver)
                .setParameters(LoadMetricDefinition.TYPE)
                .setRuntimeOnly()
                .build();
        final OperationDefinition removeCustomDef = new SimpleOperationDefinitionBuilder(CommonAttributes.REMOVE_CUSTOM_METRIC, rootResolver)
                .setParameters(CustomLoadMetricDefinition.CLASS)
                .setRuntimeOnly()
                .build();

        resourceRegistration.registerOperationHandler(addMetricDef, ModClusterAddMetric.INSTANCE);
View Full Code Here

    public void registerAttributes(final ManagementResourceRegistration registry) {
        registry.registerReadOnlyAttribute(STARTED, this);
    }

    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);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.OperationDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.