01: /*
02: * Copyright 2007 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: */
13: package org.pentaho.core.subscribe;
14:
15: import java.util.Date;
16:
17: import org.quartz.StatefulJob;
18:
19: public interface IScheduledJob {
20:
21: public final static int STATE_NORMAL = 0;
22:
23: public final static int STATE_PAUSED = 1;
24:
25: /**
26: * The trigger has no remaining fire-times in its schedule.
27: * </p>
28: */
29: public final static int STATE_COMPLETE = 2;
30:
31: /**
32: * A <code>ScheduledJob</code> arrives at the error state when the scheduler
33: * attempts to fire it, but cannot due to an error creating and executing
34: * its related job. Often this is due to the <code>Job</code>'s
35: * class not existing in the classpath.
36: * </p>
37: *
38: * <p>
39: * When the ScheduledJob is in the error state, the scheduler will make no
40: * attempts to fire it.
41: * </p>
42: */
43: public final static int STATE_ERROR = 3;
44:
45: /**
46: * A <code>ScheduledJob</code> arrives at the blocked state when the job that
47: * it is associated with is a <code>StatefulJob</code> and it is
48: * currently executing.
49: * </p>
50: *
51: * @see StatefulJob
52: */
53: public final static int STATE_BLOCKED = 4;
54:
55: /**
56: * <p>
57: * Indicates that the <code>ScheduledJob</code> does not exist.
58: * </p>
59: */
60: public final static int STATE_NONE = -1;
61:
62: public Date getNextTriggerTime();
63:
64: public Date getLastTriggerTime();
65:
66: public int getExecutionState();
67:
68: public String getDescription();
69:
70: public String getUniqueId();
71:
72: public String getErrorMessage();
73:
74: }
|