Examples of PathAddress


Examples of org.jboss.as.controller.PathAddress

*/
public abstract class HandlerUpdateProperties implements OperationStepHandler {
    static final String OPERATION_NAME = "update-properties";

    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final String name = address.getLastElement().getValue();

        final ModelNode model = context.readModelForUpdate(PathAddress.EMPTY_ADDRESS);

        if (operation.hasDefined(LEVEL)) {
            apply(operation, model, LEVEL);
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

public class LoggerLevelChange implements OperationStepHandler {
    static final String OPERATION_NAME = "change-log-level";
    static final LoggerLevelChange INSTANCE = new LoggerLevelChange();

    public void execute(OperationContext context, ModelNode operation) {
        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final String name = address.getLastElement().getValue();
        final String level = operation.get(CommonAttributes.LEVEL).asString();

        context.readModelForUpdate(PathAddress.EMPTY_ADDRESS).get(CommonAttributes.LEVEL).set(level);

        if (context.getType() == OperationContext.Type.SERVER) {
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

        model.get(CommonAttributes.LEVEL).set(level);
        model.get(CommonAttributes.HANDLERS).set(handlers);
    }

    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
        final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
        final String name = address.getLastElement().getValue();
        final String level = operation.require(CommonAttributes.LEVEL).asString();
        final ModelNode handlers = operation.hasDefined(CommonAttributes.HANDLERS) ? operation.get(CommonAttributes.HANDLERS) : new ModelNode();

        final ServiceTarget target = context.getServiceTarget();
        final String loggerName = name;
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

        model.get(LEVEL).set(operation.get(LEVEL));
        model.get(FILE).set(operation.get(FILE));
    }

    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final String name = address.getLastElement().getValue();

        final ServiceTarget serviceTarget = context.getServiceTarget();
        try {
            final FileHandlerService service = new FileHandlerService();
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

        if (existingFile.hasDefined(CommonAttributes.RELATIVE_TO)) {
            existingFile.get(CommonAttributes.RELATIVE_TO).set(operation.get(CommonAttributes.RELATIVE_TO));
        }

        final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
        final String name = address.getLastElement().getValue();

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(final OperationContext context, final ModelNode operation) {
                    final ServiceRegistry serviceRegistry = context.getServiceRegistry(false);
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

class LoggerHandlerRemove extends AbstractRemoveStepHandler {

    static final LoggerHandlerRemove INSTANCE = new LoggerHandlerRemove();

    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) {
        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final String name = address.getLastElement().getValue();
        context.removeService(LogServices.handlerName(name));
    }
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

        model.get(FILE).set(operation.get(FILE));
        model.get(SUFFIX).set(operation.get(SUFFIX));
    }

    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
        final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
        final String name = address.getLastElement().getValue();
        final ServiceTarget serviceTarget = context.getServiceTarget();
        try {
            final PeriodicRotatingFileHandlerService service = new PeriodicRotatingFileHandlerService();
            final ServiceBuilder<Handler> serviceBuilder = serviceTarget.addService(LogServices.handlerName(name), service);
            if (operation.hasDefined(FILE)) {
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

public class HandlerLevelChange implements OperationStepHandler {
    static final String OPERATION_NAME = "change-log-level";
    static final HandlerLevelChange INSTANCE = new HandlerLevelChange();

    public void execute(OperationContext context, ModelNode operation) {
        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        final String name = address.getLastElement().getValue();
        final String level = operation.get(CommonAttributes.LEVEL).asString();

        context.readModelForUpdate(PathAddress.EMPTY_ADDRESS).get(CommonAttributes.LEVEL).set(level);

        if (context.getType() == OperationContext.Type.SERVER) {
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

        static final String PROXIES = "proxies";

        @Override
        public OperationResult execute(final OperationContext context, final ModelNode operation, final ResultHandler resultHandler) throws OperationFailedException {

            final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
            final ModelNode result = readModel(context, operation, resultHandler, address);
            resultHandler.handleResultFragment(Util.NO_LOCATION, result);
            resultHandler.handleResultComplete();
            return new BasicOperationResult();
        }
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

                for (ProxyController proxyController : proxyControllers) {
                    final ModelNode proxyResult = proxyController.execute(OperationBuilder.Factory.copy(context, operation).build());

                    //Trim the address to not include the host=>hostB part if this is a slave controller
                    PathAddress proxyAddress = proxyController.getProxyNodeAddress();
//                    if (proxyAddress.size() > 1) {
//                        if (proxyAddress.getElement(0).getKey().equals(HOST)) {
//                            proxyAddress = proxyAddress.subAddress(1);
//                            proxyResult =
//                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.