1 package org.oddjob; 2 3 import org.oddjob.state.JobStateListener; 4 5 6 /** 7 * A stateful job implments this interface so that 8 * it's state can be discovered. State is used to 9 * control the flow of execution within Oddjob, as 10 * well as being a way of informing client applications 11 * of progress. 12 * 13 * @author Rob Gordon 14 */ 15 16 public interface Stateful { 17 18 /** 19 * Add a job state listener. 20 * 21 * @param listener The listener. 22 */ 23 24 public void addJobStateListener(JobStateListener listener); 25 26 /** 27 * Remove a job state listener. 28 * 29 * @param listener The listener. 30 */ 31 32 public void removeJobStateListener(JobStateListener listener); 33 34 } 35