Examples of PathAddress


Examples of org.gatein.management.api.PathAddress

      // Validate request
      Response response = validateRequest(request);
      if (response != null) return response;

      String operationName = request.getOperationName();
      PathAddress address = request.getAddress();
      try
      {
         ManagedResponse resp = controller.execute(request);
         if (resp == null)
         {
View Full Code Here

Examples of org.gatein.management.api.PathAddress

               resolveLinks(mo.get(name), uriInfo);
            }
            break;
         case REFERENCE:
            ModelReference ref = value.asValue(ModelReference.class);
            PathAddress address = ref.getValue();
            ref.remove("_ref");
            LinkBuilder linkBuilder = new LinkBuilder(uriInfo.getBaseUriBuilder());
            linkBuilder.path(RestApplication.API_ENTRY_POINT).path(address.toString());
            ref.get("url").set(linkBuilder.build().getHref());
            break;
         case LIST:
            for (ModelValue mv : value.asValue(ModelList.class))
            {
View Full Code Here

Examples of org.gatein.management.api.PathAddress

         path = path.substring(0, path.lastIndexOf(".zip"));
         operationName = OperationNames.EXPORT_RESOURCE;
         contentType = ContentType.ZIP;
      }

      PathAddress address = PathAddress.pathAddress(path);
      if (contentType == null)
      {
         contentType = ContentType.JSON; // default to JSON
      }
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

            model.get(SECURITY_REALM).set(operation.get(SECURITY_REALM).asString());
        }
    }

    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 connectorName = address.getLastElement().getValue();
        ServiceName tmpDirPath = ServiceName.JBOSS.append("server", "path", "jboss.controller.temp.dir");
        final ServiceName securityRealm = model.hasDefined(SECURITY_REALM) ? SecurityRealmService.BASE_SERVICE_NAME
                .append(model.require(SECURITY_REALM).asString()) : null;
        RemotingServices.installSecurityServices(context.getServiceTarget(), connectorName, securityRealm, null, tmpDirPath, verificationHandler, newControllers);
        launchServices(context, address, connectorName, model, verificationHandler, newControllers);
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

*/
public class HandlerDisable implements OperationStepHandler {
    static final HandlerDisable INSTANCE = new HandlerDisable();

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

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

Examples of org.jboss.as.controller.PathAddress

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

    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();

        final ConsoleHandlerService service = new ConsoleHandlerService();
        final ServiceBuilder<Handler> serviceBuilder = serviceTarget.addService(LogServices.handlerName(name), service);
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

    static final LoggingDescribeHandler INSTANCE = new LoggingDescribeHandler();

    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        final ModelNode model = context.readModel(PathAddress.EMPTY_ADDRESS);

        PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(OP_ADDR)).getLastElement());
        final ModelNode result = context.getResult();
        result.add(LoggingExtension.NewLoggingSubsystemAdd.createOperation(rootAddress.toModelNode()));
        if (model.hasDefined(ROOT_LOGGER)) {
            ModelNode add = Util.getEmptyOperation(RootLoggerAdd.OPERATION_NAME, rootAddress.toModelNode());
            add.get(LEVEL).set(model.get(ROOT_LOGGER, LEVEL));
            add.get(HANDLERS).set(model.get(ROOT_LOGGER, HANDLERS));
            result.add(add);
        }
        if (model.hasDefined(LOGGER)) {
            for (Property prop : model.get(LOGGER).asPropertyList()) {
                ModelNode add = Util.getEmptyOperation(ADD, rootAddress.append(PathElement.pathElement(LOGGER, prop.getName())).toModelNode());
                add.get(HANDLERS).set(prop.getValue().get(HANDLERS));
                add.get(LEVEL).set(prop.getValue().get(LEVEL));
                result.add(add);
            }
        }
View Full Code Here

Examples of org.jboss.as.controller.PathAddress

*/
public class HandlerEnable implements OperationStepHandler {
    static final HandlerEnable INSTANCE = new HandlerEnable();

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

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

Examples of org.jboss.as.controller.PathAddress

        model.get(MAX_BACKUP_INDEX).set(operation.get(MAX_BACKUP_INDEX));
        model.get(ROTATE_SIZE).set(operation.get(ROTATE_SIZE));
    }

    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 SizeRotatingFileHandlerService service = new SizeRotatingFileHandlerService();
            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

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

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

        final ServiceTarget serviceTarget = context.getServiceTarget();
        final AsyncHandlerService service = new AsyncHandlerService();
        final ServiceBuilder<Handler> serviceBuilder = serviceTarget.addService(LogServices.handlerName(name), service);
        final List<InjectedValue<Handler>> list = new ArrayList<InjectedValue<Handler>>();
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.