Package org.apache.airavata.gfac.notification.events

Examples of org.apache.airavata.gfac.notification.events.StatusChangeEvent


    public void statusChanged(GramJob job) {
        String jobStatusMessage = "Status of job " + job.getIDAsString() + "is " + job.getStatusAsString();
        /*
         * Notify status change
         */
        this.context.getNotifier().publish(new StatusChangeEvent(jobStatusMessage));

        /*
         * Set new status if it is finished, notify all wait object
         */
        if (setStatus(job.getStatus(), job.getError())) {
View Full Code Here


        int jobStatus = job.getStatus();
        String jobStatusMessage = "Status of job " + job.getIDAsString() + "is " + job.getStatusAsString();
        /*
         * Notify currentStatus change
         */
        this.context.getNotifier().publish(new StatusChangeEvent(jobStatusMessage));

        /*
         * Set new currentStatus if it is jobDone, notify all wait object
         */
        if (currentStatus != jobStatus) {
View Full Code Here

    public synchronized void statusChanged(GramJob job) {
        String jobStatusMessage = "Status of job " + job.getIDAsString() + "is " + job.getStatusAsString();
        /*
         * Notify status change
         */
        this.context.getNotifier().publish(new StatusChangeEvent(jobStatusMessage));

        /*
         * Set new status if it is finished, notify all wait object
         */
        if (setStatus(job.getStatus(), job.getError())) {
View Full Code Here

                ActivityStatusType activityStatus = null;
                try {
                    activityStatus = getStatus(factory, activityEpr);
                    ApplicationJobStatus applicationJobStatus = getApplicationJobStatus(activityStatus);
                    String jobStatusMessage = "Status of job " + jobId + "is " + applicationJobStatus;
                    jobExecutionContext.getNotifier().publish(new StatusChangeEvent(jobStatusMessage));
                    GFacUtils.updateApplicationJobStatus(jobExecutionContext, jobId, applicationJobStatus);
                } catch (UnknownActivityIdentifierFault e) {
                    throw new GFacProviderException(e.getMessage(), e.getCause());
                }

                try {
                    Thread.sleep(5000);
                } catch (InterruptedException e) {
                }
                continue;
            }

            ActivityStatusType activityStatus = null;
            try {
                activityStatus = getStatus(factory, activityEpr);
            } catch (UnknownActivityIdentifierFault e) {
                throw new GFacProviderException(e.getMessage(), e.getCause());
            }

            log.info(formatStatusMessage(activityEpr.getAddress().getStringValue(), activityStatus.getState()
                    .toString()));

            if ((activityStatus.getState() == ActivityStateEnumeration.FAILED)) {
                String error = activityStatus.getFault().getFaultcode().getLocalPart() + "\n"
                        + activityStatus.getFault().getFaultstring() + "\n EXITCODE: " + activityStatus.getExitCode();
                log.info(error);
                try {
                    Thread.sleep(5000);
                } catch (InterruptedException e) {
                }
                dt.downloadStdOuts();
            } else if (activityStatus.getState() == ActivityStateEnumeration.CANCELLED) {
                String experimentID = (String) jobExecutionContext.getProperty(Constants.PROP_TOPIC);
                ApplicationJobStatus applicationJobStatus = ApplicationJobStatus.CANCELED;
                String jobStatusMessage = "Status of job " + jobId + "is " + applicationJobStatus;
                jobExecutionContext.getNotifier().publish(new StatusChangeEvent(jobStatusMessage));
                GFacUtils.updateApplicationJobStatus(jobExecutionContext, jobId, applicationJobStatus);
                throw new GFacProviderException(experimentID + "Job Canceled");
            }

            else if (activityStatus.getState() == ActivityStateEnumeration.FINISHED) {
View Full Code Here

        int jobStatus = job.getStatus();
        String jobStatusMessage = "Status of job " + job.getIDAsString() + "is " + job.getStatusAsString();
        /*
         * Notify currentStatus change
         */
        this.context.getNotifier().publish(new StatusChangeEvent(jobStatusMessage));

        /*
         * Set new currentStatus if it is jobDone, notify all wait object
         */
        if (currentStatus != jobStatus) {
View Full Code Here

    public GSISSHJobSubmissionListener(JobExecutionContext context) {
        this.context = context;
    }

    public void statusChanged(JobDescriptor jobDescriptor) throws SSHApiException {
        this.context.getNotifier().publish(new StatusChangeEvent("Job status has changed to : " + jobDescriptor.getStatus()));
    }
View Full Code Here

        this.context.getNotifier().publish(new StatusChangeEvent("Job status has changed to : " + jobDescriptor.getStatus()));
    }

    @Override
    public void statusChanged(JobStatus jobStatus) throws SSHApiException {
        this.context.getNotifier().publish(new StatusChangeEvent("Job status has changed to : " + jobStatus.toString()));
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.gfac.notification.events.StatusChangeEvent

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.