cleanup / abuse system fix / prepping for a release
[mir.git] / source / mir / producer / Producer.java
index 4b28461..75312a7 100755 (executable)
@@ -29,9 +29,7 @@
  */
 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
@@ -53,18 +51,16 @@ import mir.log.LoggerWrapper;
  * 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);
 }