Package org.jboss.as.controller

Examples of org.jboss.as.controller.RuntimeTask


        subModel.get(Constants.CONNECTOR).setEmptyObject();
        subModel.get(Constants.VIRTUAL_SERVER).setEmptyObject();

        if (updateContext instanceof BootOperationContext) {
            final BootOperationContext ctx = (BootOperationContext) updateContext;
            updateContext.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final String defaultVirtualServer = operation.has(Constants.DEFAULT_VIRTUAL_SERVER) ?
                            operation.get(Constants.DEFAULT_VIRTUAL_SERVER).asString() : DEFAULT_VIRTUAL_SERVER;
                    final boolean useNative = operation.has(Constants.NATIVE) ?
                            operation.get(Constants.NATIVE).asBoolean() : DEFAULT_NATIVE;
View Full Code Here


        subModel.get(Constants.ALIAS).set(operation.get(Constants.ALIAS));
        subModel.get(Constants.ACCESS_LOG).set(operation.get(Constants.ACCESS_LOG));
        subModel.get(Constants.REWRITE).set(operation.get(Constants.REWRITE));

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    final WebVirtualHostService service = new WebVirtualHostService(name, aliases(operation));
                    final ServiceBuilder<?> serviceBuilder = serviceTarget.addService(WebSubsystemServices.JBOSS_WEB_HOST.append(name), service)
                            .addDependency(AbstractPathService.pathNameOf(TEMP_DIR), String.class, service.getTempPathInjector())
View Full Code Here

        subModel.get(FILE).set(operation.get(FILE));
        subModel.get(QUEUE_LENGTH).set(operation.get(QUEUE_LENGTH));


        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    try {
                        final FileHandlerService service = new FileHandlerService();
                        final ServiceBuilder<Handler> serviceBuilder = serviceTarget.addService(LogServices.handlerName(name), service);
View Full Code Here

        compensatingOperation.get(OP).set(ADD);
        compensatingOperation.get(CommonAttributes.LEVEL).set(subModel.get(CommonAttributes.LEVEL));
        compensatingOperation.get(CommonAttributes.HANDLERS).set(subModel.get(CommonAttributes.HANDLERS));

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceRegistry registry = context.getServiceRegistry();
                    final ServiceController<?> controller = registry.getService(LogServices.loggerName(name));
                    if (controller != null) {
                        controller.setMode(ServiceController.Mode.REMOVE);
View Full Code Here

        final ModelNode subModel = context.getSubModel();
        subModel.get(CommonAttributes.ROOT_LOGGER, CommonAttributes.LEVEL).set(level);
        subModel.get(CommonAttributes.ROOT_LOGGER, CommonAttributes.HANDLERS).set(handlers);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget target = context.getServiceTarget();
                    try {
                        final RootLoggerService service = new RootLoggerService();
                        service.setLevel(Level.parse(level));
View Full Code Here

        compensatingOperation.get(CommonAttributes.HANDLERS).set(subModel.get(CommonAttributes.ROOT_LOGGER, CommonAttributes.HANDLERS));

        subModel.get(CommonAttributes.ROOT_LOGGER).clear();

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceRegistry registry = context.getServiceRegistry();
                    final ServiceController<?> controller = registry.getService(LogServices.ROOT_LOGGER);
                    if (controller != null) {
                        controller.setMode(ServiceController.Mode.REMOVE);
View Full Code Here

        for(final Property property : subModel.asPropertyList()) {
            compensatingOperation.get(property.getName()).set(property.getValue());
        }

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceRegistry registry = context.getServiceRegistry();
                    try {
                        final ServiceController<?> controller = registry.getService(LogServices.handlerName(name));
                        if (controller != null) {
View Full Code Here

        subModel.get(FILE).set(operation.get(FILE));
        subModel.get(QUEUE_LENGTH).set(operation.get(QUEUE_LENGTH));
        subModel.get(SUFFIX).set(operation.get(SUFFIX));

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    try {
                        final PeriodicRotatingFileHandlerService service = new PeriodicRotatingFileHandlerService();
                        final ServiceBuilder<Handler> serviceBuilder = serviceTarget.addService(LogServices.handlerName(name), service);
View Full Code Here

        subModel.get(SUBHANDLERS).set(operation.get(SUBHANDLERS));
        subModel.get(LEVEL).set(operation.get(LEVEL));
        subModel.get(OVERFLOW_ACTION).set(operation.get(OVERFLOW_ACTION));

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    try {
                        final AsyncHandlerService service = new AsyncHandlerService();
                        final ServiceBuilder<Handler> serviceBuilder = serviceTarget.addService(LogServices.handlerName(name), service);
View Full Code Here

        subModel.get(HANDLER_TYPE).set(handlerType);
        subModel.get(LEVEL).set(operation.get(LEVEL));
        subModel.get(QUEUE_LENGTH).set(operation.get(QUEUE_LENGTH));

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    try {
                        final ConsoleHandlerService service = new ConsoleHandlerService();
                        final ServiceBuilder<Handler> serviceBuilder = serviceTarget.addService(LogServices.handlerName(name), service);
View Full Code Here

TOP

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

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.