01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.kfs.batch;
17:
18: public interface Step {
19: /**
20: * Perform this step of a batch job.
21: *
22: * @return true if successful and continue the job, false if successful and stop the job
23: * @throws Throwable if unsuccessful
24: */
25: public boolean execute(String jobName) throws InterruptedException;
26:
27: /**
28: * Return id of this step spring bean.
29: *
30: * @return The name of this step.
31: */
32: public String getName();
33:
34: /**
35: * Call to attempt to interrupt a step in the middle of processing. Note that this only has an effect if the step in question
36: * checks its interrupted status.
37: */
38: public void interrupt();
39:
40: public boolean isInterrupted();
41:
42: public void setInterrupted(boolean interrupted);
43: }
|