Package org.glite.lb

Examples of org.glite.lb.EventCREAMCall


            jobid = new Jobid(job.getGridJobId());
        }

        ctx.setJobid(jobid);

        EventCREAMCall event = new EventCREAMCall();
        event.setCallee(new Sources(Sources.LRMS));
        event.setCmdid(""+cmd.getId());
       
        // logger.debug("execute: id = " + cmd.getId() + " name = " +
        // cmd.getName()+ " category = " + cmd.getCategory() +
        // " failureReason = " + cmd.getFailureReason() + " description = " +
        // cmd.getDescription());

        switch (phase) {
            case START:
                event.setResult(EventCREAMCall.Result.START);
                break;
            case OK:
                event.setResult(EventCREAMCall.Result.OK);
                event.setDestid(destid);
                break;
            case FAILED:
                event.setResult(EventCREAMCall.Result.FAILED);
                event.setReason(reason.getMessage());
                break;
        }

        if (JobCommandConstant.JOB_START.equals(cmd.getName())) {
            event.setCommand(EventCREAMCall.Command.CMDSTART);
        } else if (JobCommandConstant.JOB_CANCEL.equals(cmd.getName())) {
            event.setCommand(EventCREAMCall.Command.CMDCANCEL);
        } else if (JobCommandConstant.JOB_PURGE.equals(cmd.getName())) {
            event.setCommand(EventCREAMCall.Command.CMDPURGE);
        } else if (JobCommandConstant.JOB_SUSPEND.equals(cmd.getName())) {
            event.setCommand(EventCREAMCall.Command.CMDSUSPEND);
        } else if (JobCommandConstant.JOB_RESUME.equals(cmd.getName())) {
            event.setCommand(EventCREAMCall.Command.CMDRESUME);
        } else {
            throw new LBException("LBLogger.execute(): not handled " + cmd.getName());
        }
       
        ctx.log(event);
View Full Code Here

TOP

Related Classes of org.glite.lb.EventCREAMCall

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.