activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r538932 - in /activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam: ./ processor/ rules/
Date Thu, 17 May 2007 14:10:52 GMT
Author: jstrachan
Date: Thu May 17 07:10:51 2007
New Revision: 538932

URL: http://svn.apache.org/viewvc?view=rev&rev=538932
Log:
removed more old cruft and tidied up the javadoc

Modified:
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
    activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java?view=diff&rev=538932&r1=538931&r2=538932
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/ActivityBuilder.java
Thu May 17 07:10:51 2007
@@ -67,7 +67,7 @@
      */
     public TimeExpression starts() {
         return new TimeExpression(this, ActivityLifecycle.Started) {
-            public Date evaluateState(ProcessInstance instance, ActivityState state) {
+            public Date evaluate(ProcessInstance instance, ActivityState state) {
                 return state.getTimeStarted();
             }
         };
@@ -78,7 +78,7 @@
      */
     public TimeExpression completes() {
         return new TimeExpression(this, ActivityLifecycle.Completed) {
-            public Date evaluateState(ProcessInstance instance, ActivityState state) {
+            public Date evaluate(ProcessInstance instance, ActivityState state) {
                 return state.getTimeCompleted();
             }
         };
@@ -98,6 +98,4 @@
         return processBuilder;
     }
 
-    // Implementation methods
-    //-----------------------------------------------------------------------
 }

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java?view=diff&rev=538932&r1=538931&r2=538932
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/TimeExpression.java
Thu May 17 07:10:51 2007
@@ -51,15 +51,15 @@
         return rule;
     }
 
-    public Date evaluateState(ProcessInstance processInstance) {
+    public Date evaluate(ProcessInstance processInstance) {
         ActivityState state = processInstance.getActivityState(activityRules);
         if (state != null) {
-            return evaluateState(processInstance, state);
+            return evaluate(processInstance, state);
         }
         return null;
     }
 
-    public abstract Date evaluateState(ProcessInstance instance, ActivityState state);
+    public abstract Date evaluate(ProcessInstance instance, ActivityState state);
 
     // Properties
     //-------------------------------------------------------------------------

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java?view=diff&rev=538932&r1=538931&r2=538932
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
Thu May 17 07:10:51 2007
@@ -35,6 +35,8 @@
 import java.util.List;
 
 /**
+ * A timer engine to monitor for expired activities and perform whatever actions are required.
+ * 
  * @version $Revision: $
  */
 public class ActivityMonitorEngine extends ServiceSupport implements Runnable {

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java?view=diff&rev=538932&r1=538931&r2=538932
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/BamProcessorSupport.java
Thu May 17 07:10:51 2007
@@ -31,8 +31,9 @@
 import java.lang.reflect.ParameterizedType;
 
 /**
- * A {@link Processor} for working on
- * <a href="http://activemq.apache.org/camel/bam.html">BAM</a>
+ * A base {@link Processor} for working on
+ * <a href="http://activemq.apache.org/camel/bam.html">BAM</a> which a derived
class would do the actual
+ * persistence such as the {@link JpaBamProcessor}
  *
  * @version $Revision: $
  */

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java?view=diff&rev=538932&r1=538931&r2=538932
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
Thu May 17 07:10:51 2007
@@ -21,12 +21,17 @@
 import org.apache.camel.bam.rules.ActivityRules;
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
+import org.apache.camel.Processor;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.support.TransactionTemplate;
 
 /**
+ * A concrete {@link Processor} for working on
+ * <a href="http://activemq.apache.org/camel/bam.html">BAM</a> which uses JPA
as the persistence and uses the
+ * {@link ProcessInstance} entity to store the process information.
+ *
  * @version $Revision: $
  */
 public class JpaBamProcessor extends JpaBamProcessorSupport<ProcessInstance> {
@@ -41,7 +46,9 @@
     }
 
     protected void processEntity(Exchange exchange, ProcessInstance process) throws Exception
{
-        log.info("Processing entity! - attempting to get the current state for process: "
+ process);
+        if (log.isDebugEnabled()) {
+            log.info("Processing process instance: " + process);
+        }
 
         // lets force the lazy creation of this activity
         ActivityRules rules = getActivityRules();

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java?view=diff&rev=538932&r1=538931&r2=538932
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
Thu May 17 07:10:51 2007
@@ -28,6 +28,9 @@
 import java.util.List;
 
 /**
+ * A base class for JPA based BAM which can use any entity to store the process instance
information which
+ * allows derived classes to specialise the process instance entity.
+ *
  * @version $Revision: $
  */
 public class JpaBamProcessorSupport<T> extends BamProcessorSupport<T> {

Modified: activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java?view=diff&rev=538932&r1=538931&r2=538932
==============================================================================
--- activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java
(original)
+++ activemq/camel/trunk/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java
Thu May 17 07:10:51 2007
@@ -34,7 +34,7 @@
 import java.util.Date;
 
 /**
- * A temporal rule
+ * A temporal rule for use within BAM
  *
  * @version $Revision: $
  */
@@ -89,7 +89,7 @@
     }
 
     public void processExchange(Exchange exchange, ProcessInstance instance) {
-        Date firstTime = first.evaluateState(instance);
+        Date firstTime = first.evaluate(instance);
         if (firstTime == null) {
             // ignore as first event has not accurred yet
             return;



Mime
View raw message