Package org.qzerver.model.agent.action.providers

Examples of org.qzerver.model.agent.action.providers.ActionExecutor


        } catch (ActionDefinitionMarshallerException e) {
            throw new SystemIntegrityException("Fail to unmarshall definition", e);
        }

        // Search for action executor
        ActionExecutor actionExecutor = executors.get(actionIdentifier);
        if (actionExecutor == null) {
            throw new NullPointerException("Executor is not found for identifier " + identifier);
        }

        // Check: is action in progress
        Boolean alreadyExists = executionTracker.putIfAbsent(scheduleExecutionId, true);
        if (alreadyExists != null) {
            throw new IllegalStateException("Action is already perfomed for execution=#" + scheduleExecutionId);
        }

        // Execute action
        ActionResult actionResult;

        try {
            actionResult = actionExecutor.execute(actionDefinition, scheduleExecutionId, address);
            if (actionResult == null) {
                String message = String.format("Action result is null for execution=#[%d] and node=[%s]",
                    scheduleExecutionId, address);
                throw new NullPointerException(message);
            }
View Full Code Here

TOP

Related Classes of org.qzerver.model.agent.action.providers.ActionExecutor

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.