*/
package mir.producer;
-import mir.log.LoggerWrapper;
-
-/**
+/**
* <p>A Producer is a set of tasks, scripted in xml. Producers allow
* mir installations to have their own actions that can be called for
* instance when a new article is posted. Originally producers were
* the Producer interface). When the Producer is executed, the
* "produce" methods of each node are recursively called, effectively
* executing the program as it was scripted</p>
- *
- *
*/
public interface Producer {
/**
- *
- *
- * @param aLogger
- * @return <code>false</code> if aborted,<code>true</code> if not
- * @throws ProducerFailure
- * @throws ProducerExc
+ * Execute the producer
+ */
+ public boolean execute(ProductionContext aContext) throws ProducerFailure, ProducerExc;
+
+ /**
+ * Abort the execution of the producer. Will be called from a different
+ * thread and implementations should take this into account.
*/
- public boolean produce( LoggerWrapper aLogger ) throws ProducerFailure, ProducerExc;
- public void abort();
+ public void abort(ProductionContext aContext);
}