Package ca.eandb.jdcp.job

Examples of ca.eandb.jdcp.job.TaskWorker


            currentJobId = jobId;
            currentTaskId = taskId;
            activeWorkers.add(this);

            this.monitor.notifyStatusChanged("Obtaining task worker...");
            TaskWorker worker;
            try {
              worker = getTaskWorker(jobId);
            } catch (DelegationException e) {
              worker = null;
            } catch (ClassNotFoundException e) {
              service.reportException(jobId, 0, e);
              idle(EXCEPTION_IDLE_SECONDS, EXCEPTION_IDLE_MESSAGE);
              worker = null;
            }

            if (worker == null) {
              this.monitor.notifyStatusChanged("Could not obtain worker...");
              this.monitor.notifyCancelled();
              return;
            }

            this.monitor.notifyStatusChanged("Performing task...");
            ClassLoader loader = worker.getClass().getClassLoader();
            Object results;

            try {
              Object task = taskDesc.getTask().deserialize(loader);
              results = worker.performTask(task, monitor);
            } catch (DelegationException e) {
              results = null;
            } catch (Exception e) {
              service.reportException(jobId, taskId, e);
              idle(EXCEPTION_IDLE_SECONDS, EXCEPTION_IDLE_MESSAGE);
View Full Code Here

TOP

Related Classes of ca.eandb.jdcp.job.TaskWorker

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.