You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/12/23 12:43:27 UTC

svn commit: r1647556 - in /manifoldcf/branches/CONNECTORS-1119: connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/ framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/ framework/pull-agen...

Author: kwright
Date: Tue Dec 23 11:43:26 2014
New Revision: 1647556

URL: http://svn.apache.org/r1647556
Log:
Hook into job stops as well as job ends

Modified:
    manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
    manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/INotificationConnector.java
    manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/notifications/BaseNotificationConnector.java
    manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java

Modified: manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java?rev=1647556&r1=1647555&r2=1647556&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java Tue Dec 23 11:43:26 2014
@@ -220,7 +220,7 @@ public class EmailConnector extends org.
   *@param spec is the notification specification.
   */
   @Override
-  public void notifyOfJobEnd(Specification spec)
+  public void notifyOfJobStop(Specification spec)
     throws ManifoldCFException, ServiceInterruption
   {
     // Grab the necessary info from the spec

Modified: manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/INotificationConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/INotificationConnector.java?rev=1647556&r1=1647555&r2=1647556&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/INotificationConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/INotificationConnector.java Tue Dec 23 11:43:26 2014
@@ -59,10 +59,10 @@ public interface INotificationConnector
   public boolean requestInfo(Configuration output, String command)
     throws ManifoldCFException;
 
-  /** Notify of job end
+  /** Notify of job stop
   *@param spec is the notification specification.
   */
-  public void notifyOfJobEnd(Specification spec)
+  public void notifyOfJobStop(Specification spec)
     throws ManifoldCFException, ServiceInterruption;
   
   // UI support methods.

Modified: manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/notifications/BaseNotificationConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/notifications/BaseNotificationConnector.java?rev=1647556&r1=1647555&r2=1647556&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/notifications/BaseNotificationConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/notifications/BaseNotificationConnector.java Tue Dec 23 11:43:26 2014
@@ -64,11 +64,11 @@ public abstract class BaseNotificationCo
     return false;
   }
 
-  /** Notify of job end.
+  /** Notify of job stop.
   *@param spec is the notification specification.
   */
   @Override
-  public void notifyOfJobEnd(Specification spec)
+  public void notifyOfJobStop(Specification spec)
     throws ManifoldCFException, ServiceInterruption
   {
   }

Modified: manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java?rev=1647556&r1=1647555&r2=1647556&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java (original)
+++ manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java Tue Dec 23 11:43:26 2014
@@ -77,6 +77,8 @@ public class JobResetThread extends Thre
             connectionManager.recordHistory(desc.getConnectionName(),
               null,connectionManager.ACTIVITY_JOBSTOP,null,
               desc.getID().toString()+"("+desc.getDescription()+")",null,null,null);
+            // As a courtesy, call all the notification connections (if any)
+            doNotifications(desc,notificationManager,notificationPool);
           }
 
           ArrayList jobResumes = new ArrayList();
@@ -193,7 +195,7 @@ public class JobResetThread extends Thre
           {
             try
             {
-              connector.notifyOfJobEnd(jobDescription.getNotificationSpecification(j));
+              connector.notifyOfJobStop(jobDescription.getNotificationSpecification(j));
             }
             finally
             {