Examples of RuntimeTask


Examples of org.jboss.as.controller.RuntimeTask

        // update the model
        context.getSubModel().get(CommonAttributes.SCAN_ENABLED).set(false);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> controller = context.getServiceRegistry()
                            .getService(DeploymentScannerService.getServiceName(name));
                    if (controller == null) {
                        throw new OperationFailedException(new ModelNode().set("scanner not configured"));
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        compensatingOperation.get(OP_ADDR).set(operation.require(OP_ADDR));
        // update the model
        context.getSubModel().get(CommonAttributes.SCAN_ENABLED).set(true);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> controller = context.getServiceRegistry().getService(DeploymentScannerService.getServiceName(name));
                    if (controller == null) {
                        throw new OperationFailedException(new ModelNode().set("scanner not configured"));
                    } else {
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        subModel.get(CommonAttributes.SERVER_BINDING).clear();
        subModel.get(CommonAttributes.REGISTRY_BINDING).clear();

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> service = context.getServiceRegistry().getService(JMXConnectorService.SERVICE_NAME);
                    if (service != null) {
                        service.setMode(ServiceController.Mode.REMOVE);
                    }
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        context.getSubModel().get(CommonAttributes.REGISTRY_BINDING).set(registryBinding);

        final ModelNode compensatingOperation = Util.getEmptyOperation(JMXConnectorRemove.OPERATION_NAME, operation.require(OP_ADDR));

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget target = context.getServiceTarget();
                    JMXConnectorService.addService(target, serverBinding, registryBinding);
                    resultHandler.handleResultComplete();
                }
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        context.getSubModel().get(CommonAttributes.SERVER_BINDING);
        context.getSubModel().get(CommonAttributes.REGISTRY_BINDING);

        if(context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    // Add the MBean service
                    MBeanServerService.addService(context.getServiceTarget());
                    resultHandler.handleResultComplete();
                }
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        subModel.get(CommonAttributes.SCAN_ENABLED).set(enabled);
        subModel.get(CommonAttributes.SCAN_INTERVAL).set(interval);
        if(relativeTo != null) subModel.get(CommonAttributes.RELATIVE_TO).set(relativeTo);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    DeploymentScannerService.addService(serviceTarget, name, relativeTo, path, interval, TimeUnit.MILLISECONDS, enabled);
                    resultHandler.handleResultComplete();
                }
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        compensatingOperation.get(CommonAttributes.SCAN_ENABLED).set(subModel.get(CommonAttributes.SCAN_ENABLED));
        compensatingOperation.get(CommonAttributes.SCAN_INTERVAL).set(subModel.get(CommonAttributes.SCAN_INTERVAL));
        compensatingOperation.get(CommonAttributes.RELATIVE_TO).set(subModel.get(CommonAttributes.RELATIVE_TO));

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> controller = context.getServiceRegistry()
                            .getService(DeploymentScannerService.getServiceName(name));
                    if (controller != null) {
                        controller.addListener(new ResultHandler.ServiceRemoveListener(resultHandler));
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        context.getSubModel().setEmptyObject();

        if (context instanceof BootOperationContext) {
            final BootOperationContext bootContext = (BootOperationContext) context;
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    bootContext.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_JAXRS_ANNOTATIONS, new JaxrsAnnotationProcessor());
                    bootContext.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_JAXRS, new JaxrsDependencyProcessor());
                    bootContext.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_JAXRS_SCANNING, new JaxrsScanningProcessor());
                    bootContext.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_JAXRS_COMPONENT, new JaxrsComponentDeployer());
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        ModelNode restoreOperation = ProtocolStackAdd.createOperation(opAddr, context.getSubModel());

        RuntimeOperationContext runtime = context.getRuntimeContext();
        if (runtime != null) {
            RuntimeTask task = new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    ServiceController<?> service = context.getServiceRegistry().getService(ChannelFactoryService.getServiceName(name));
                    if (service != null) {
                        service.addListener(new ResultHandler.ServiceRemoveListener(resultHandler));
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        populate(operation, context.getSubModel());

        RuntimeOperationContext runtime = context.getRuntimeContext();
        if (runtime != null) {
            RuntimeTask task = new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    ModelNode transport = operation.get(ModelKeys.TRANSPORT);
                    TransportConfigurationImpl transportConfig = new TransportConfigurationImpl(transport.require(ModelKeys.TYPE).asString());
                    ProtocolStackConfigurationImpl stackConfig = new ProtocolStackConfigurationImpl(transportConfig);
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.