Mercurial > projects > dwt-addons
comparison dwtx/core/internal/jobs/JobChangeEvent.d @ 122:9d0585bcb7aa
Add core.jobs package
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 12 Aug 2008 02:34:21 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
121:c0304616ea23 | 122:9d0585bcb7aa |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2003, 2005 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM - Initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.core.internal.jobs.JobChangeEvent; | |
14 | |
15 import dwt.dwthelper.utils; | |
16 | |
17 import dwtx.core.runtime.IStatus; | |
18 import dwtx.core.runtime.jobs.IJobChangeEvent; | |
19 import dwtx.core.runtime.jobs.Job; | |
20 | |
21 public class JobChangeEvent : IJobChangeEvent { | |
22 /** | |
23 * The job on which this event occurred. | |
24 */ | |
25 Job job = null; | |
26 /** | |
27 * The result returned by the job's run method, or <code>null</code> if | |
28 * not applicable. | |
29 */ | |
30 IStatus result = null; | |
31 /** | |
32 * The amount of time to wait after scheduling the job before it should be run, | |
33 * or <code>-1</code> if not applicable for this type of event. | |
34 */ | |
35 long delay = -1; | |
36 /** | |
37 * Whether this job is being immediately rescheduled. | |
38 */ | |
39 bool reschedule = false; | |
40 | |
41 /* (non-Javadoc) | |
42 * Method declared on IJobChangeEvent | |
43 */ | |
44 public long getDelay() { | |
45 return delay; | |
46 } | |
47 | |
48 /* (non-Javadoc) | |
49 * Method declared on IJobChangeEvent | |
50 */ | |
51 public Job getJob() { | |
52 return job; | |
53 } | |
54 | |
55 /* (non-Javadoc) | |
56 * Method declared on IJobChangeEvent | |
57 */ | |
58 public IStatus getResult() { | |
59 return result; | |
60 } | |
61 } |