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

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


        throws ActionResultMarshallerException
    {
        Preconditions.checkNotNull(actionResultClass, "Action result class is null");
        Preconditions.checkNotNull(result, "Result data array is null");

        ActionResult actionResult;
        try {
            actionResult = objectMapper.readValue(result, actionResultClass);
        } catch (IOException e) {
            String message = "Fail to unmarshall action result for identifier " + actionResultClass;
            throw new ActionResultMarshallerException(message, e);
View Full Code Here


        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);
            }
        } finally {
            executionTracker.remove(scheduleExecutionId);
        }

        // Marshall execution result
        byte[] actionResultData = actionResultMarshaller.marshall(actionResult);

        // Compose the result record
        ActionAgentResult actionAgentResult = new ActionAgentResult();
        actionAgentResult.setSucceed(actionResult.isSucceed());
        actionAgentResult.setData(actionResultData);

        return actionAgentResult;
    }
View Full Code Here

TOP

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

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.