Package org.gatein.management.api.operation

Examples of org.gatein.management.api.operation.OperationHandler.execute()


    private void executeHandlers(ManagedResource resource, final OperationContext operationContext, PathAddress address,
            String operationName, StepResultHandler<PageNavigation> stepResultHandler, PathTemplateFilter filter, boolean root) {
        OperationHandler handler = resource.getOperationHandler(address, operationName);
        if (handler != null && !root && address.accepts(filter)) {
            handler.execute(operationContext, stepResultHandler);
        } else {
            OperationHandler readResource = resource.getOperationHandler(address, OperationNames.READ_RESOURCE);
            BasicResultHandler readResourceResult = new BasicResultHandler();
            readResource.execute(new OperationContextDelegate(operationContext) {
                @Override
View Full Code Here


        if (handler != null && !root && address.accepts(filter)) {
            handler.execute(operationContext, stepResultHandler);
        } else {
            OperationHandler readResource = resource.getOperationHandler(address, OperationNames.READ_RESOURCE);
            BasicResultHandler readResourceResult = new BasicResultHandler();
            readResource.execute(new OperationContextDelegate(operationContext) {
                @Override
                public String getOperationName() {
                    return OperationNames.READ_RESOURCE;
                }
            }, readResourceResult);
View Full Code Here

    private void executeHandlers(ManagedResource resource, final OperationContext operationContext, PathAddress address,
            String operationName, StepResultHandler<PageNavigation> stepResultHandler, PathTemplateFilter filter, boolean root) {
        OperationHandler handler = resource.getOperationHandler(address, operationName);
        if (handler != null && !root && address.accepts(filter)) {
            handler.execute(operationContext, stepResultHandler);
        } else {
            OperationHandler readResource = resource.getOperationHandler(address, OperationNames.READ_RESOURCE);
            BasicResultHandler readResourceResult = new BasicResultHandler();
            readResource.execute(new OperationContextDelegate(operationContext) {
                @Override
View Full Code Here

        if (handler != null && !root && address.accepts(filter)) {
            handler.execute(operationContext, stepResultHandler);
        } else {
            OperationHandler readResource = resource.getOperationHandler(address, OperationNames.READ_RESOURCE);
            BasicResultHandler readResourceResult = new BasicResultHandler();
            readResource.execute(new OperationContextDelegate(operationContext) {
                @Override
                public String getOperationName() {
                    return OperationNames.READ_RESOURCE;
                }
            }, readResourceResult);
View Full Code Here

         String componentName = (address.size() >= 1) ? address.get(0) : null;
         BindingProvider bindingProvider = managementService.getBindingProvider(componentName);

         // Execute operation for given registered operation handler
         BasicResultHandler resultHandler = new BasicResultHandler();
         operationHandler.execute(new OperationContextImpl(request, root, runtimeContext, bindingProvider), resultHandler);

         if (resultHandler.getFailureDescription() != null)
         {
            return new FailureResponse(resultHandler.getFailureDescription());
         }
View Full Code Here

   private void executeHandlers(ManagedResource resource, final OperationContext operationContext, PathAddress address, String operationName, StepResultHandler<PageNavigation> stepResultHandler, PathTemplateFilter filter, boolean root)
   {
      OperationHandler handler = resource.getOperationHandler(address, operationName);
      if (handler != null && !root && address.accepts(filter))
      {
         handler.execute(operationContext, stepResultHandler);
      }
      else
      {
         OperationHandler readResource = resource.getOperationHandler(address, OperationNames.READ_RESOURCE);
         BasicResultHandler readResourceResult = new BasicResultHandler();
View Full Code Here

      }
      else
      {
         OperationHandler readResource = resource.getOperationHandler(address, OperationNames.READ_RESOURCE);
         BasicResultHandler readResourceResult = new BasicResultHandler();
         readResource.execute(new OperationContextDelegate(operationContext)
         {
            @Override
            public String getOperationName()
            {
               return OperationNames.READ_RESOURCE;
View Full Code Here

         // ModelProvider to use for de-typed models
         ModelProvider modelProvider = DmrModelProvider.INSTANCE;

         // Execute operation for given registered operation handler
         BasicResultHandler resultHandler = new BasicResultHandler();
         operationHandler.execute(new OperationContextImpl(request, root, runtimeContext, externalContext, bindingProvider, modelProvider), resultHandler);

         if (resultHandler.getFailureDescription() != null)
         {
            return new FailureResponse(modelProvider.newModel().set(resultHandler.getFailureDescription()));
         }
View Full Code Here

            throw new OperationException(operationName, "Could not parse filter attributes.", e);
         }

         if (address.accepts(filter))
         {
            handler.execute(operationContext, stepResultHandler);
         }
      }
      else
      {
         ManagedResource found = resource.getSubResource(address);
View Full Code Here

            throw new OperationException(operationName, "Could not locate resource at address " + address);
         }
        
         OperationHandler readResource = resource.getOperationHandler(address, OperationNames.READ_RESOURCE);
         BasicResultHandler readResourceResult = new BasicResultHandler();
         readResource.execute(operationContext, readResourceResult);
         if (readResourceResult.getFailureDescription() != null)
         {
            throw new OperationException(operationName, "Failure '" + readResourceResult.getFailureDescription() + "' encountered executing " + OperationNames.READ_RESOURCE);
         }
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.